lorenzodifuccia / safaribooks

Download and generate EPUB of your favorite books from O'Reilly Learning (aka Safari Books Online) library.
Do What The F*ck You Want To Public License
4.61k stars 684 forks source link

Reduce risk of false positives in the link_replace method #308

Open darren-gibson opened 2 years ago

darren-gibson commented 2 years ago

sometimes where the link is an HTML page the code incorrectly identifies the link as an Image because it contains the on of the keywords that indicate that this could be an Image. This pull request only uses the keyword if the link is not a HTML page link.

below is an example of a link that was incorrectly changed to be under Images/ because its text contains "cover":

href="Images/ch08.xhtml#sec-ggg-comp-discovery"