python-reddit-youtube-bot icon indicating copy to clipboard operation
python-reddit-youtube-bot copied to clipboard

Login issue fixed... Another issue popped !

Open sebbourgeois opened this issue 2 years ago • 3 comments

Of course it couldn't be just that easy... ;)

As I wrote in the login issue post, there is something weird going on with the comments now. Basically the videos generated are very short because of the comments' screenshots. A lot of them are rejected with the following message :

2024-01-27 17:57:17 INFO     === Processing Reddit Comment 8/92 ===
2024-01-27 17:57:18 INFO     Created Audio File : assets/work_dir/1abur4l/kjqmbix.mp3
2024-01-27 17:57:18 INFO     Comment larger than video height : assets/work_dir/1abur4l/comment_kjqmbix.png

Ultimately, a video that should be usually around 10mins long barely makes more than 2-3 minutes because of all the rejected comments.

sebbourgeois avatar Jan 27 '24 18:01 sebbourgeois

Had a look tonight, Reddit must have changed layout/html again because I can see in the work_dir for example :

D:\src\python-reddit-youtube-bot\assets\work_dir\1acs310

comments are being saved that look like this, there is some banner in the way... so it has a large height which exceeds the video height, hence why they are all being skipped, will need to look into how to handle that banner if it pops up :

image

Example comment with banner :

comment_kjwej7c

alexlaverty avatar Jan 28 '24 09:01 alexlaverty

I tried to find a workaround on my end but no chance so far. Any luck on your end @alexlaverty ?

sebbourgeois avatar Feb 03 '24 13:02 sebbourgeois

haven't had any luck so far, I think might need a bit of an uplift to provide option to not use reddit api for retrieving the posts from a subreddit, would be easiest to use https://old.reddit.com/ as it has a simple interface and use screen scraping like Selenium or Playwright to do it.

alexlaverty avatar Feb 06 '24 09:02 alexlaverty