mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-06 03:20:24 +02:00
Update adapter_royalroadcom.py
This commit is contained in:
parent
479c0b7d95
commit
26a59b373a
1 changed files with 3 additions and 3 deletions
|
|
@ -127,10 +127,10 @@ class RoyalRoadAdapter(BaseSiteAdapter):
|
|||
self.styles_to_ignore = set()
|
||||
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:
|
||||
class_matches = re.findall(r'\.(\S+)\s*\{[^\}]*display\s*:\s*none\s*;[^\}]*\}', style_content, flags=re.IGNORECASE)
|
||||
class_matches = re.findall(r'\.(\S+)\s*\{[^\}]*display\s*:\s*none\s*;[^\}]*\}', style_element.string, flags=re.IGNORECASE)
|
||||
if class_matches:
|
||||
self.styles_to_ignore.update(class_matches)
|
||||
del class_matches
|
||||
self.handle_spoilers(soup)
|
||||
return soup
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue