Commit 8bfb2242 authored by The Heavy's avatar The Heavy 🚂
Browse files

Update caveats in README.md

parent 495dc870
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -32,4 +32,12 @@ the python script doesn't pretend to understand html, it reads the file into mem

## caveats

badly formatted html won't stop it, but it also will react unpredictably. it tries to strip unnecessary whitespace from the url, but that doesn't always work right. if a quote is missing, it may miss the url entirely, or it may grab half the file and think that is the url, i capped the url length at 40 characters (now 100 and adjustable on the command line) to try and avoid sending garbage requests. i have no idea what it does with urls that fail to load (now throws a warning if the server doesn't send a 200), or don't contain an image. i do not recommend removing the original file until you have thoroughly checked everything. it cannot handle already local files, but it should throw a warning alerting you to them. it cannot handle javascript loaded images at all unless it fits with standard html, if the js uses img it should throw a warning but no guarantees.
- badly formatted html won't stop it, but it also will react unpredictably
- it tries to strip unnecessary whitespace from the url, but that doesn't always work right
- if a quote is missing, it may miss the url entirely, or it may grab half the file and think that is the url, i capped the url length at 100 characters (adjustable on the command line) to try and avoid sending garbage requests
- it will throw a warning if the server doesn't send a 200 OK
- i have no idea how it will react if the url doesn't contain an image (probably just stuffs it into the file anyway, leaving total garbage)
- i do not recommend removing the original file until you have thoroughly checked everything
- it can now handle relative paths to files if you use the --url argument, otherwise it should throw a warning alerting you to them
- it can sort of handle javascript loaded images as long as the JS uses an img tag but no guarantees (and only if the JS is in the HTML file)
- it will hold the entire file in memory (probably multiple copies actually as it progresses), including the encoded image data, so memory usage can get a bit crazy, i saw one file go over 5GiB! and it doesn't write the file until it's finished so if you run out of RAM i guess you get nothing