dteviot / WebToEpub

A simple Chrome (and Firefox) Extension that converts Web Novels (and other web pages) into an EPUB.
Other
710 stars 134 forks source link

Failure to fetch Imgur gallery stops fetching chapters #165

Closed dteviot closed 6 years ago

dteviot commented 6 years ago

Requested by G4mbar Yeaaah

authors tend to post links to fanart straight from their chapters, and the pictures become unavailable with time ... but with just clicking 'Cancel' once every few chapters, you can still download/convert the whole epub. What I've run into today, is an error that just stops the download and converts what's been downloaded up to this point. You can try it on this link: https://royalroadl.com/fiction/8463/the-arcane-emperor you'll get twice the error I've mentioned above - you can continue by clicking on 'Cancel'. Once you get to chapter 60, though, you'll get a list of errors, and you're immediately offered the download of epub - which contains only chapters up to 60 (out of 98).

dteviot commented 6 years ago

Best guess, problem is there's this on page.

<a href="http://imgur.com/a/l24eE">Rainer</a>

However Imgur reports a 404 error this URL. So Imgur.expandGalleries() is not catching the 404 exception, which terminates collecting chapters.

Note: might also be that site s23.posting.org no longer exists. So attempt to fetch image https://s23.postimg.org/rqwq95l1n/New_Canvads.jpg?noredir=1 on page fails with the network error "Failed to Fetch".