View Single Post
Old 08-20-2016, 09:44 PM   #7
sup
Zealot
sup began at the beginning.
 
Posts: 103
Karma: 10
Join Date: Sep 2013
Device: Kindle Paperwhite (2012)
Quote:
Originally Posted by kovidgoyal View Post
No, you cannot have per feed values in remove_tags_* . You will need to implement the cleanup yourself, in preprocess_html
If that is indeed the case, would you please update the documentation here ?

remove_tags_after shows this example:

Code:
remove_tags_after = [dict(id='content')]
which is actually wrong because if used like that (with the "[]" making it into a list), I got this:

Code:
TypeError: find() argument after ** must be a mapping, not list
Also, the documentation should note that even if the basic syntax is the same as with remove_tags, it must not be a list.

(BTW: I would love if one could use lists in these cases as well. I am writing a recipe for one magazine and it uses some special formatting for certain articles, so for those articles I have to somehow re-implement remove_tags_before myself, hopefully it wont be that hard:-)).
sup is offline   Reply With Quote