Skip to content

Commit 051ef85

Browse files
Fix lint errors: remove unused import, fix f-string warnings
1 parent 89be674 commit 051ef85

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

bin/scrape.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
If output_dir is not specified, outputs to the current directory.
1212
"""
1313

14-
import os
1514
import re
1615
import sys
1716
import time
@@ -60,7 +59,7 @@ def get_all_pages():
6059
time.sleep(DELAY)
6160
html = fetch(f"{BASE_URL}/?do=index&idx={ns}")
6261
if html:
63-
for m in re.finditer(rf'href="/([^"?#]+)"', html):
62+
for m in re.finditer(r'href="/([^"?#]+)"', html):
6463
p = m.group(1)
6564
if not p.startswith(('lib/', '_', 'feed')) and '?' not in p:
6665
pages.add(p)
@@ -70,7 +69,7 @@ def get_all_pages():
7069
time.sleep(DELAY)
7170
sub_html = fetch(f"{BASE_URL}/?do=index&idx={sub_ns}")
7271
if sub_html:
73-
for m2 in re.finditer(rf'href="/([^"?#]+)"', sub_html):
72+
for m2 in re.finditer(r'href="/([^"?#]+)"', sub_html):
7473
p = m2.group(1)
7574
if not p.startswith(('lib/', '_', 'feed')) and '?' not in p:
7675
pages.add(p)

0 commit comments

Comments
 (0)