yt-dlp: kick.com videos - HTTP Error 403: Forbidden
DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE
- I understand that I will be blocked if I intentionally remove or skip any mandatory* field
Checklist
- I’m reporting that a supported site is broken
- I’ve verified that I’m running yt-dlp version 2023.03.04 (update instructions) or later (specify commit)
- I’ve checked that all provided URLs are playable in a browser with the same IP and same login details
- I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
- I’ve searched known issues and the bugtracker for similar issues including closed ones. DO NOT post duplicates
- I’ve read the guidelines for opening an issue
- I’ve read about sharing account credentials and I’m willing to share it if required
Region
Sweden
Provide a description that is worded well enough to be understood
Yt-dlp gets stuck on a 403 forbidden error on kick.com video sites. The site still works and plays in browser but I do get redirected via a cloudflare site which I’m suspecting is the problem. The website version works and plays the video without requiring login on Firefox and Chrome. I’m on the latest 2023.03.04 version of yt-dlp.
Debugging attempts: Using session cookies via --cookies cookies.txt downloaded through a browser extension does not work. Still getting a 403 error.
Forcing the user agent to be Mozilla via --user-agent “Mozilla/5.0” has no effect. Still getting a 403 error.
Grabbing the m3u8 stream from inspecting memory in browser and downloading it via yt-dlp that way works i.e:
yt-dlp https://stream.kick.com/ivs/v1/196233775518/LfDRYYsAP6oJ/2023/4/8/2/37/iddbzqX5UQuJ/media/hls/master.m3u8
Hence it seems to not be able to resolve the website.
If there is a way to resolve cloudflare I could not find it in the issue tracker and if I missed it I apologize, I don’t mean to waste anyone’s time. Thank you for all your hard work!
How to reproduce:
yt-dlp https://kick.com/video/234e331d-f8bd-4935-b72d-0ec5354a652e
Output including error:
[generic] 234e331d-f8bd-4935-b72d-0ec5354a652e: Downloading webpage ERROR: [generic] Unable to download webpage: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>); please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U
Provide verbose output that clearly demonstrates the problem
- Run your yt-dlp command with -vU flag added (
yt-dlp -vU <your command line>
) - If using API, add
'verbose': True
toYoutubeDL
params instead - Copy the WHOLE output (starting with
[debug] Command-line config
) and insert it below
Complete Verbose Output
yt-dlp https://kick.com/video/234e331d-f8bd-4935-b72d-0ec5354a652e -vU
[debug] Command-line config: ['https://kick.com/video/234e331d-f8bd-4935-b72d-0ec5354a652e', '-vU']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.11.11 [8b64402] (pip)
[debug] Python 3.9.6 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1k 25 Mar 2021)
[debug] exe versions: ffmpeg 2020-12-15-git-32586a42da-full_build-www.gyan.dev, ffprobe 2020-12-15-git-32586a42da-full_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.16.0, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1723 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2023.03.04, Current version: 2022.11.11
[debug] Downloading _update_spec from https://github.com/yt-dlp/yt-dlp/releases/download/2023.03.04/_update_spec
ERROR: You installed yt-dlp with pip or using the wheel from PyPi; Use that to update
[debug] [generic] Extracting URL: https://kick.com/video/234e331d-f8bd-4935-b72d-0ec5354a652e
[generic] 234e331d-f8bd-4935-b72d-0ec5354a652e: Downloading webpage
ERROR: [generic] Unable to download webpage: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>); please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U
File "c:\python39\lib\site-packages\yt_dlp\extractor\common.py", line 674, in extract
ie_result = self._real_extract(url)
File "c:\python39\lib\site-packages\yt_dlp\extractor\generic.py", line 2582, in _real_extract
full_response = self._request_webpage(url, video_id, headers={
File "c:\python39\lib\site-packages\yt_dlp\extractor\common.py", line 825, in _request_webpage
raise ExtractorError(errmsg, cause=err)
File "c:\python39\lib\site-packages\yt_dlp\extractor\common.py", line 807, in _request_webpage
return self._downloader.urlopen(self._create_request(url_or_request, data, headers, query))
File "c:\python39\lib\site-packages\yt_dlp\YoutubeDL.py", line 3692, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "c:\python39\lib\urllib\request.py", line 523, in open
response = meth(req, response)
File "c:\python39\lib\urllib\request.py", line 632, in http_response
response = self.parent.error(
File "c:\python39\lib\urllib\request.py", line 561, in error
return self._call_chain(*args)
File "c:\python39\lib\urllib\request.py", line 494, in _call_chain
result = func(*args)
File "c:\python39\lib\urllib\request.py", line 641, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 4
- Comments: 71 (12 by maintainers)
workaround for now is to add
--legacy-server-connect
to your commandCloudflare seem to have blocked it 😦
Here’s a new automated workaround (once again, the manual workaround is documented here)
uname -m
to find out which one c. Windows: curl-impersonate-wincurl_chrome110
andcurl-impersonate-chrome
b. Windows: all the files, I guesskickcomcookies.txt
for some reason)React with a 👍 if it worked 😃
I’ve pushed a change to the Kick extractor. Now it will continue to try to extract the video if the first request fails.
Here’s what you can try:
With your yt-dlp win exe, run
yt-dlp --update-to nightly
Try
yt-dlp -v https://kick.com/video/234e331d-f8bd-4935-b72d-0ec5354a652e
If that fails, then try navigating to the site in your browser, and passing cookies from browser to yt-dlp:
yt-dlp -v --cookies-from-browser chrome https://kick.com/video/234e331d-f8bd-4935-b72d-0ec5354a652e
(or replacechrome
with whatever browser you visit kick.com with)If the above also fails, then find your browser’s user-agent string (you can type “what is my user-agent” into duckduckgo or google), and try running:
yt-dlp -v --user-agent "USER_AGENT" --cookies-from-browser chrome https://kick.com/video/234e331d-f8bd-4935-b72d-0ec5354a652e
(replaceUSER_AGENT
with your actual user-agent string)If successful, please reply with which worked for you (2, 3 or 4)
If you are still getting an error, please post the verbose log as text
Obviously still not reliable for livestreams, but if you have curl installed (
winget install curl
) you can run the following to automate it:ujhgtfjhgfbv
is a random string from me banging my keyboard. i’d recommend replacing it (in both commands) since I expect it to get blocked after I post thisThank you so much! Step 4 worked for me after trying the previous steps.
You’re literally downloading silly videos with meaningless streamers and e-girls, not your bank account. Relax.
Website works but yt-dlp gets 403’d with the latest nightly.
However, you can still download the VOD by getting the master m3u8 and plugging that into yt-dlp as described in this video guide.
https://streamable.com/xbel1y
note that #7595 (curl_cffi) still works
@RevSnowfox #7595 will most likely fix it
For those who don’t want to go through the message history, here’s an automated workaround, and here’s a manual workaround
Nobody is getting IP blacklisted. They’re just not using the master.m3u8 link from the public-facing link.
this appears to fix the issue. just re-verified that the regular approach results in 403, adding --legacy-server-connect results in successful download.