Skip to content

Commit

Permalink
scrape_docs simplify default out condition
Browse files Browse the repository at this point in the history
  • Loading branch information
JOJ0 committed Sep 10, 2024
1 parent c5b9a1b commit 4a8d6b1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scrape_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ def scrape(output, url):
elements = soup.find_all([*any_heading_tag, 'a'],)

for e in elements:
if e.name in any_heading_tag:
if output in ['default']:
print(f'{e.name}: {e.text}')
if e.name in any_heading_tag and output == 'default':
print(f'{e.name}: {e.text}')
if e.name == 'a':
if e.parent.name in any_heading_tag:
link = e['href']
Expand Down

0 comments on commit 4a8d6b1

Please sign in to comment.