mirror of
https://github.com/kemayo/leech
synced 2025-12-06 16:33:16 +01:00
Fix the royalroad stolen-content removal
They added speak:none to the CSS, and I was strictly checking for a rule that only contained display:none.
This commit is contained in:
parent
64d77b62db
commit
cc423f62bb
1 changed files with 1 additions and 1 deletions
|
|
@ -115,7 +115,7 @@ class RoyalRoad(Site):
|
|||
# HTML, and hiding them with CSS. Currently the CSS is very easy to
|
||||
# find, so do so and filter them out.
|
||||
for style in full_page.find_all('style'):
|
||||
if m := re.match(r'\s*\.(\w+)\s*{\s*display:\s*none;\s*}', style.string):
|
||||
if m := re.match(r'\s*\.(\w+)\s*{[^}]*display:\s*none;[^}]*}', style.string):
|
||||
for warning in contents.find_all(class_=m.group(1)):
|
||||
warning.decompose()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue