edde746 / tiktok-askreddit

A content generation & posting bot for TikTok, scraping posts from r/AskReddit
141 stars 20 forks source link

Failure to ignore Deleted comments. #11

Open ThijnvanSummeren opened 2 years ago

ThijnvanSummeren commented 2 years ago

Hi @edde746, thanks for this amazing project. It has been running well, however i ran into a problem. The line try: comments[i].find_element_by_css_selector(".icon.icon-lock_fill") in scraper.py (line 46) filters out locked comments, however there's no filter for deleted comments. Deleted comments will result in an 0kb audio file which causes MoviePy to error. I've tried fixing this problem by adding the line: comments[i].find_element_by_css_selector('Comment deleted by user').text however i've had no luck doing so, could you look into this?

Thanks!