Skip to content

Commit

Permalink
Fixing error with deleted accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
jpontoire committed Jan 10, 2025
1 parent bf8aee9 commit c28763c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion minet/reddit/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,10 @@ def get_comments(self, url: str, all):
points = None
else:
comment_url = com.scrape_one("a[class='bylink']", "href")
author = com.scrape_one("a[class^='author']")
try_author = com.select_one("div.entry.unvoted")
author = try_author.scrape_one("a[class^='author']")
if not author:
author = "[Deleted]"
points = get_points(com)
published_date, edited_date = get_dates(com)
if "morerecursion" in com.get("class") and all:
Expand Down

0 comments on commit c28763c

Please sign in to comment.