File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111If output_dir is not specified, outputs to the current directory.
1212"""
1313
14- import os
1514import re
1615import sys
1716import 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 )
You can’t perform that action at this time.
0 commit comments