Skip to content

Commit b414d8a

Browse files
committed
Fixing bug with old posts
1 parent 1e311fd commit b414d8a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

minet/reddit/scraper.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,11 @@ def reddit_request(url, pool_manager):
8787
return response, soup, None
8888

8989

90-
def extract_t1_ids(text):
91-
return [match.group(1) for match in re.finditer(ID_RE, text)]
90+
def extract_t1_ids(text: str):
91+
ids = [match.group(1) for match in re.finditer(ID_RE, text)]
92+
if ids:
93+
return ids
94+
return text.split("'")[-4].split(",")
9295

9396

9497
def get_current_id(com):

0 commit comments

Comments
 (0)