leech icon indicating copy to clipboard operation
leech copied to clipboard

Add a filter for chapter selector

Open KeinNiemand opened this issue 4 years ago • 3 comments

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.

KeinNiemand avatar Dec 25 '20 12:12 KeinNiemand

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?

Aquan1412 avatar Feb 10 '21 18:02 Aquan1412

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.

kemayo avatar Feb 12 '21 16:02 kemayo

Great, thanks for the answer and the helpful example!

Aquan1412 avatar Feb 19 '21 20:02 Aquan1412