Skip to content

Commit

Permalink
Fixing bug with old posts
Browse files Browse the repository at this point in the history
  • Loading branch information
jpontoire committed Jan 14, 2025
1 parent 1e311fd commit b414d8a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions minet/reddit/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,11 @@ def reddit_request(url, pool_manager):
return response, soup, None


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


def get_current_id(com):
Expand Down

0 comments on commit b414d8a

Please sign in to comment.