iarna / fetch-fic

Package up delicious, delicious fanfic from various sources into epub ebooks ready for reading in your ereader of choice. It can ALSO take your freshly written fanfic and prepare it for sharing easy peasy
ISC License
15 stars 6 forks source link

TypeError after XenForo Threadmark change #10

Open michael42 opened 5 years ago

michael42 commented 5 years ago

When trying to load a few large fics from Spacebattles, there's an unhandled error with fetch-fic 3.8.3.

TypeError: Cannot read property 'replace' of undefined
    at Xenforo.normalizeLink (.../node_modules/fetch-fic/site/xenforo.js:416:46)
    at Node.chapters.each (.../node_modules/fetch-fic/site/xenforo.js:65:27)
    at initialize.exports.each (.../node_modules/cheerio/lib/api/traversing.js:300:24)
    at loadThreadmarks (.../node_modules/fetch-fic/site/xenforo.js:59:16)
    at Xenforo.getFicMetadata (.../node_modules/fetch-fic/site/xenforo.js:72:5)

Apparently, other people have also noticed, e.g. see https://github.com/JimmXinu/FanFicFare/issues/332. There's also a nice example with tons of hidden threadmarks: https://forums.sufficientvelocity.com/threads/to-boldly-go-a-starfleet-quest.32005/threadmarks