elebumm / RedditVideoMakerBot

Create Reddit Videos with just✨ one command ✨
GNU General Public License v3.0
6.6k stars 1.84k forks source link

[Bug]: Youtube Download Error #2154

Open Gareryer opened 1 week ago

Gareryer commented 1 week ago

Describe the bug

Sign in to confirm you’re not a bot

Reproduction Steps

python3 main.py

Expected behavior

Expected Output >>

Screenshots

`╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ Downloading screenshots of reddit posts... │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ Launching Headless Browser... Logging in to Reddit... Skipping translation... Downloading screenshots... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:59 Screenshots downloaded Successfully. ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ We need to download the backgrounds videos. they are fairly large but it's only done once. 😎 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ Downloading the backgrounds videos... please be patient 🙏 Downloading parkour.mp4 from https://www.youtube.com/watch?v=n_Dv4JMiwK8 [youtube] Extracting URL: https://www.youtube.com/watch?v=n_Dv4JMiwK8 [youtube] n_Dv4JMiwK8: Downloading webpage [youtube] n_Dv4JMiwK8: Downloading ios player API JSON ERROR: [youtube] n_Dv4JMiwK8: Sign in to confirm you’re not a bot. This helps protect our community. Learn more ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ 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: ERROR: [youtube] n_Dv4JMiwK8: Sign in to confirm you’re not a bot. This helps protect our community. Learn more │ │ 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': 'Reddit 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': │ │ 'tiktok', 'random_voice': True, 'elevenlabs_voice_name': 'Bella', 'elevenlabs_api_key': 'REDACTED', 'aws_polly_voice': 'Matthew', 'streamlabs_polly_voice': 'Matthew', 'tiktok_voice': │ │ 'en_us_001', 'tiktok_sessionid': 'REDACTED', 'python_voice': '1', 'py_voice_num': '2', 'silence_duration': 0.3, 'no_emojis': False}} │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 1606, in wrapper return func(self, *args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 1741, in __extract_info ie_result = ie.extract(url) File "/usr/local/lib/python3.10/dist-packages/yt_dlp/extractor/common.py", line 734, in extract ie_result = self._real_extract(url) File "/usr/local/lib/python3.10/dist-packages/yt_dlp/extractor/youtube.py", line 4248, in _real_extract self.raise_no_formats(reason, expected=True) File "/usr/local/lib/python3.10/dist-packages/yt_dlp/extractor/common.py", line 1257, in raise_no_formats raise ExtractorError(msg, expected=expected, video_id=video_id) yt_dlp.utils.ExtractorError: [youtube] n_Dv4JMiwK8: Sign in to confirm you’re not a bot. This helps protect our community. Learn more

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/user/reddit/RedditVideoMakerBot/main.py", line 131, in raise err File "/user/reddit/RedditVideoMakerBot/main.py", line 113, in run_many(config["settings"]["times_to_run"]) File "/user/reddit/RedditVideoMakerBot/main.py", line 68, in run_many main() File "/user/reddit/RedditVideoMakerBot/main.py", line 57, in main download_background_video(bg_config["video"]) File "/user/reddit/RedditVideoMakerBot/video_creation/background.py", line 95, in download_background_video ydl.download(uri) File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 3583, in download self.__download_wrapper(self.extract_info)( File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 3558, in wrapper res = func(*args, *kwargs) File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 1595, in extract_info return self.__extract_info(url, self.get_info_extractor(key), download, extra_info, process) File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 1624, in wrapper self.report_error(str(e), e.format_traceback()) File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 1073, in report_error self.trouble(f'{self._format_err("ERROR:", self.Styles.ERROR)} {message}', args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/yt_dlp/YoutubeDL.py", line 1012, in trouble raise DownloadError(message, exc_info) yt_dlp.utils.DownloadError: ERROR: [youtube] n_Dv4JMiwK8: Sign in to confirm you’re not a bot. This helps protect our community. Learn more user@user:~/reddit/RedditVideoMakerBot#`

System Information

Operating System : Ubuntu 24.4 LTS Python version : Python 3.10 App version / Branch : latest

Checklist

Additional Context

None

Motzumoto commented 6 days ago

Turn on a vpn. If you're hosting this through your vps or a server provider, you will almost always see this issue.