leech
leech copied to clipboard
Add a filter for chapter selector
I tried using this to Download worm with the included example .json file for worm, but it dosn't work becouse it tries and fails to download the twitter and facebook links at the end of the post. These links could be excluded by excluding links in a .sharedaddy but that's alredy in the filter and the filter only works for the actual content of the chapters not for the table of contents/chapter selector. To solve this a Filter for chapter_selector / the table of contents is needed.
I would also like to have such a function. I ran into a similar problem when I tried to download Heretical Edge 2, since there are some (nonessential) chapters posted on patreon.com, and downloading via chapter_selector always breaks when it tries to access this content.
Would it maybe possible to "simply" skip all external links with chapter_selector?
The Worm one got fixed by #47.
For Heretical Edge, I think you have the tools you need -- specifically, the :not CSS filter. If you did chapter_selector: "article .entry-content > p > a:not([href*=patreon])" it'd probably work.
Great, thanks for the answer and the helpful example!