Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any Python Script to Save Websites Like Firefox?

Tags:

python

I am tired of clicking "File" and then "Save Page As" in Firefox when I want to save some websites.

Is there any script to do this in Python? I would like to save the pictures and css files so that when I read it offline, it looks normal.

like image 438
Unknown Avatar asked Apr 09 '26 09:04

Unknown


2 Answers

You could use wget

wget -m -k -E [url]

-E, --html-extension        save HTML documents with `.html' extension.
-m,  --mirror             shortcut for -N -r -l inf --no-remove-listing.
-k,  --convert-links      make links in downloaded HTML point to local files.
like image 81
Cato Johnston Avatar answered Apr 10 '26 23:04

Cato Johnston


probably a tool like wget is more appropriate for this type of thing.

like image 36
cobbal Avatar answered Apr 10 '26 23:04

cobbal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!