RedditVideoMakerBot icon indicating copy to clipboard operation
RedditVideoMakerBot copied to clipboard

Crashes when trying to download screenshots (headless browser)

Open EdyDeveloper opened this issue 4 years ago • 4 comments

╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ Getting subreddit threads... │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ What subreddit would you like to pull from? Windows11 Video will be: Windows 11 22H2 is bringing Mica/Acrylic design to more Win32 desktop apps 👍 Received subreddit threads Successfully. ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ Saving Text to MP3 files 🎶 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ Saving... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7 it/s
Saved Text to MP3 files Successfully. ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ Downloading Screenshots of Reddit Posts 📷 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ Launching Headless Browser... Traceback (most recent call last): File "/home/edydev/Desktop/TikTok/main.py", line 19, in download_screenshots_of_reddit_posts(reddit_object, number_of_comments) File "/home/edydev/Desktop/TikTok/video_creation/screenshot_downloader.py", line 22, in download_screenshots_of_reddit_posts browser = p.chromium.launch() File "/home/edydev/.local/lib/python3.10/site-packages/playwright/sync_api/_generated.py", line 11538, in launch self._sync( File "/home/edydev/.local/lib/python3.10/site-packages/playwright/_impl/_sync_base.py", line 88, in _sync return task.result() File "/home/edydev/.local/lib/python3.10/site-packages/playwright/_impl/_browser_type.py", line 90, in launch Browser, from_channel(await self._channel.send("launch", params)) File "/home/edydev/.local/lib/python3.10/site-packages/playwright/_impl/_connection.py", line 39, in send return await self.inner_send(method, params, False) File "/home/edydev/.local/lib/python3.10/site-packages/playwright/_impl/_connection.py", line 63, in inner_send result = next(iter(done)).result() playwright._impl._api_types.Error: Executable doesn't exist at /home/edydev/.cache/ms-playwright/chromium-1005/chrome-linux/chrome ╔════════════════════════════════════════════════════════════╗ ║ Looks like Playwright was just installed or updated. ║ ║ Please run the following command to download new browsers: ║ ║ ║ ║ playwright install ║ ║ ║ ║ <3 Playwright Team ║ ╚════════════════════════════════════════════════════════════╝

I filled out these fields in the .env file: REDDIT_CLIENT_ID="..." REDDIT_CLIENT_SECRET="..."

Was I supposed to fill out these too: REDDIT_USERNAME="..." REDDIT_PASSWORD="..."

EdyDeveloper avatar Jun 02 '22 18:06 EdyDeveloper

In the .env file you should fill out your reddit username and password i believe

jp-marques avatar Jun 02 '22 19:06 jp-marques

If I fill those in the script refuses to even ask me for the subreddit

EdyDeveloper avatar Jun 04 '22 19:06 EdyDeveloper

The problem is not auth but playwright thinking its not installed. I found this command in playwright's documentation, that seems to do something but PLAYWRIGHT_BROWSERS_PATH=$HOME/pw-browsers python3 -m playwright install it still shows the same error

whytf avatar Jun 06 '22 18:06 whytf

Closing due to being stale, retry in latest version and reopen if issue persists

callumio avatar Jun 22 '22 20:06 callumio