- Mar 12, 2022
- 42
- 420
anyone know how to deal with spankbang givving 403 error on yt-dlp
i did yt-dlp [ url ]
403 error bla bla bla
i did yt-dlp [ url ]
403 error bla bla bla
--legacy-server-connect
try adding--legacy-server-connect
this worked for me
yt-dlp --force-ipv4 --cookies-from-browser firefox --legacy-server-connect -vF "https://spankbang.com/81sy6/video/japanese"
Make sure you change the browser name in --cookies-from-browser to your flavor of browser , options are available at https://github.com/yt-dlp/yt-dlp/wiki/FAQ#how-do-i-pass-cookies-to-yt-dlp ... Open spankbank in your browser once ( during the session ) and yt-dlp will fetch the spankbang cookies from your browser...
Solution is from
[debug] Command-line config: ['--force-ipv4', '--cookies-from-browser', 'firefox', '--cookies', '/root/cookies.txt', '--legacy-server-connect', '-vF', 'https://spankbang.com/2mboh-kxynp1/playlist/jan+b+s+stable']
Extracting cookies from firefox
Traceback (most recent call last):
File "/usr/local/bin/yt-dlp", line 8, in <module>
sys.exit(main())
^^^^^^
File "/usr/local/lib/python3.11/site-packages/yt_dlp/__init__.py", line 1008, in main
_exit(*variadic(_real_main(argv)))
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/yt_dlp/__init__.py", line 962, in _real_main
with YoutubeDL(ydl_opts) as ydl:
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 678, in __init__
self._request_director = self.build_request_director(_REQUEST_HANDLERS.values(), _RH_PREFERENCES)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 4088, in build_request_director
cookiejar=self.cookiejar,
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/functools.py", line 1001, in __get__
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 4019, in cookiejar
return load_cookies(
^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/yt_dlp/cookies.py", line 91, in load_cookies
extract_cookies_from_browser(browser_name, profile, YDLLogger(ydl), keyring=keyring, container=container))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/yt_dlp/cookies.py", line 108, in extract_cookies_from_browser
return _extract_firefox_cookies(profile, container, logger)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/yt_dlp/cookies.py", line 133, in _extract_firefox_cookies
raise FileNotFoundError(f'could not find firefox cookies database in {search_root}')
FileNotFoundError: could not find firefox cookies database in /root/.mozilla/firefox
still same errorin that case run it without --cookies-from-browser firefox
the error is being caused by yt-dlp looking for the cookies
Last line of error ---> FileNotFoundError: could not find firefox cookies database in /root/.mozilla/firefox
just use
yt-dlp --force-ipv4 --legacy-server-connect YOUR_URL
If nothing works open an issue ticket on the yt-dlp github or post in their discord
I recommend opening an issue on their github , and mention that are running yt-dlp on a headless server ... maybe that has something to do with it.still same error