pep8 (3)
This commit is contained in:
parent
2ca96bba9c
commit
f6a82ad95c
|
@ -14,6 +14,7 @@ import os
|
||||||
|
|
||||||
minimal_mode_sections = ['Top stories', 'Images', 'People also ask']
|
minimal_mode_sections = ['Top stories', 'Images', 'People also ask']
|
||||||
|
|
||||||
|
|
||||||
def extract_q(q_str: str, href: str) -> str:
|
def extract_q(q_str: str, href: str) -> str:
|
||||||
"""Extracts the 'q' element from a result link. This is typically
|
"""Extracts the 'q' element from a result link. This is typically
|
||||||
either the link to a result's website, or a string.
|
either the link to a result's website, or a string.
|
||||||
|
@ -171,7 +172,7 @@ class Filter:
|
||||||
result_children = pull_child_divs(result)
|
result_children = pull_child_divs(result)
|
||||||
if minimal_mode:
|
if minimal_mode:
|
||||||
if any(f">{x}</span" in str(s) for s in result_children
|
if any(f">{x}</span" in str(s) for s in result_children
|
||||||
for x in minimal_mode_sections):
|
for x in minimal_mode_sections):
|
||||||
result.decompose()
|
result.decompose()
|
||||||
continue
|
continue
|
||||||
if len(result_children) < self.RESULT_CHILD_LIMIT:
|
if len(result_children) < self.RESULT_CHILD_LIMIT:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user