Safari: dump web page from safari into database field (blob)

Hello All

I would like to know if there is any manner / idea
how I could save / dump a complete web page,
while surfing with Safari, into one field of record
of a database?

Safari gives already to way to export this as PDF
but then you can give the file only a useful name,
however if it could be stored in one field of a
record in a database, with additional fields you
could store all the info you consider important
and search for it later ( knowledgebase).

Any Idea :idea: Suggestion how to do it ?

thx

linus

You can save the page as html to a temp directory and read it into a variable from there. Or do shell script to run curl. (man curl in terminal.) Use regular expressions to get image link addresses, and client side includes for javascript and css, if necessary. You’d have to relink everything. Or you could save the pdf to disk or DB BLOB for viewing, but also put the html text into the database for searching.

Use a simple Applescript to tell Safari to send the HTML source as text. With text as the result, you can store it anywhere you like, such as your own database or in a text file:

tell application “Safari”
get source of document 1
end tell