mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-08 21:11:59 +02:00
Update adapter_royalroadcom.py
owner recommended comits
This commit is contained in:
parent
52a0bb6e0e
commit
479c0b7d95
1 changed files with 2 additions and 2 deletions
|
|
@ -128,8 +128,8 @@ class RoyalRoadAdapter(BaseSiteAdapter):
|
|||
style_elements = soup.find_all('style')
|
||||
for style_element in style_elements:
|
||||
style_content = style_element.string
|
||||
if style_content and 'display: none;' in style_content.lower():
|
||||
class_matches = re.findall(r'\.(\S+)\s*\{\s*display:\s*none;\s*(?:speak:\s*never;\s*)?\}', style_content)
|
||||
if style_content and 'display: none;' in style_content:
|
||||
class_matches = re.findall(r'\.(\S+)\s*\{[^\}]*display\s*:\s*none\s*;[^\}]*\}', style_content, flags=re.IGNORECASE)
|
||||
self.styles_to_ignore.update(class_matches)
|
||||
self.handle_spoilers(soup)
|
||||
return soup
|
||||
|
|
|
|||
Loading…
Reference in a new issue