mirror of
https://github.com/kemayo/leech
synced 2025-12-22 00:04:16 +01:00
Special-case people faking tabs in xenforo
This commit is contained in:
parent
dd0248ffa0
commit
b5740691cc
1 changed files with 6 additions and 1 deletions
|
|
@ -119,7 +119,12 @@ class XenForo(Site):
|
|||
post.name = 'div'
|
||||
# mostly, we want to remove colors because the Kindle is terrible at them
|
||||
for tag in post.find_all(style=True):
|
||||
del(tag['style'])
|
||||
if tag['style'] == 'color: transparent' and tag.text == 'TAB':
|
||||
# Some stories fake paragraph indents like this. The output
|
||||
# stylesheet will handle this just fine.
|
||||
tag.extract()
|
||||
else:
|
||||
del(tag['style'])
|
||||
# spoilers don't work well, so turn them into epub footnotes
|
||||
for idx, spoiler in enumerate(post.find_all(class_='ToggleTriggerAnchor')):
|
||||
spoiler_title = spoiler.find(class_='SpoilerTitle')
|
||||
|
|
|
|||
Loading…
Reference in a new issue