[Bug]: Screenshot Error
Describe the bug
After updating to the patched version of screenshot_updater.py, I could make 4 video's and then this error keeps occuring. It happens halfway of getting the screenshots of a post. ││ waiting for locator("button[aria-controls="comment-children"]").first
Reproduction Steps
Just run the main.py
Expected behavior
It should just continue fetching the screenshots and saving them.
Screenshots
No response
System Information
Operating System : [e.g. Windows 11] Python version : [e.g. Python 3.6] App version / Branch : [e.g. latest, V2.0, master, develop]
Sorry, something went wrong with this version! Try again, and feel free to report this issue at GitHub or the Discord community. ││ Version: 3.3.0 ││ Error: Locator.click: Timeout 30000ms exceeded. ││ Call log: ││ waiting for locator("button[aria-controls="comment-children"]").first ││ ││ Config: {'allow_nsfw': False, 'theme': 'dark', 'times_to_run': 1, 'opacity': 0.9, 'storymode': False, 'storymodemethod': 1, 'storymode_max_length': 1000, 'resolution_w': 1080, 'resolution_h': 1920, 'zoom': 1.0, 'channel_name': 'Absurdantics Tales', 'background': ││ {'background_video': 'minecraft', 'background_audio': 'lofi', 'background_audio_volume': 0.15, 'enable_extra_audio': False, 'background_thumbnail': False, 'background_thumbnail_font_family': 'arial', 'background_thumbnail_font_size': 96, 'background_thumbnail_font_color': ││ '255,255,255'}, 'tts': {'voice_choice': 'streamlabspolly', 'random_voice': True, 'tiktok_voice': 'en_us_001', 'tiktok_sessionid': 'REDACTED', 'silence_duration': 0.3, 'no_emojis': False, 'elevenlabs_voice_name': 'Bella', 'elevenlabs_api_key': 'REDACTED', 'aws_polly_voice': ││ 'Matthew', 'streamlabs_polly_voice': 'Matthew', 'python_voice': '1', 'py_voice_num': '2'}}
Checklist
- [X] I have searched the open issues for duplicates.
- [X] I have shown the entire traceback, if possible.
Additional Context
No response
Full stack trace:
Traceback (most recent call last):
File "c:\Users\rickv\Desktop\Coding\RedditVideos\RedditVideoMakerBot\main.py", line 131, in
duplicate of #2129 2129
I don't agree with it being a duplicate because that has been fixed in https://github.com/elebumm/RedditVideoMakerBot/pull/2138. I have that new version of screenshot_downloader.py in my repository and it worked for 4 video's untill it gave this error.
Hmmm okay, I won't be free to look into it for a few days but I'll reopen this
Sorry guys for the late reply this error is to do with reddit blocking the browser due to suspicious activity and can be fixed by changing your ip (via a vpn)
I found a workaround for the screenshot error, as Roostydoo2 said the browser is blocked with a captcha. What I did was activate the debugging for the browse in screenshot_downloader.py. browser = p.chromium.launch( headless=True Set this to False then increase the waiting time after the script inserted the username and password to 15 seconds, this will give you enough time to complete the captcha manually. Modify the lines page.wait_for_timeout to 15000. Also what I did was I added a timeout of 60 seconds for the page.locator('[data-test-id="post-content"]').screenshot(path=postcontentpath the line would look like this page.locator('[data-test-id="post-content"]').screenshot(path=postcontentpath, timeout=60000)
não funcionou aqui, ele continua dando o mesmo erro...