Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tiktok] HTTP Error 403: Forbidden when downloading web formats for some videos #9789

Open
10 of 11 tasks
estatistics opened this issue Apr 26, 2024 · 0 comments
Open
10 of 11 tasks
Labels
site-bug Issue with a specific website

Comments

@estatistics
Copy link

estatistics commented Apr 26, 2024

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

Region

greece

Provide a description that is worded well enough to be understood

it says forbidden video while it is playable in browser in both login or incognito mode. It needs some form of cookies from browser? when i provided "--cookies-from-browser firefox" same error. I dont know if it has to do with "channel is not live" in tiktok bug.
Note that i have installed the "ttuser.py" into plugins.
and other videos of the user are downloading normally

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 to YoutubeDL params instead
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

yt-dlp -vU https://www.tiktok.com/@_christinank_/video/7132898898951130374
[debug] Command-line config: ['-vU', 'https://www.tiktok.com/@_christinank_/video/7132898898951130374']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version [email protected] from yt-dlp/yt-dlp [ff0779267] (zip)
[debug] Python 3.11.8 (CPython x86_64 64bit) - Linux-6.1.0-15-amd64-x86_64-with-glibc2.37 (OpenSSL 3.1.5 30 Jan 2024, glibc 2.37)
[debug] exe versions: ffmpeg 6.1.1-1 (setts), ffprobe 6.1.1-1, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.11.0, brotli-1.1.0, certifi-2023.11.17, mutagen-1.46.0, pyxattr-0.8.1, requests-2.31.0, sqlite3-3.45.1, urllib3-1.26.18, websockets-10.4
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests
[debug] Extractor Plugins: TTUser (TikTokUserIE), oauth2 (YoutubeBaseInfoExtractor), oauth2 (YoutubeClipIE), oauth2 (YoutubeConsentRedirectIE), oauth2 (YoutubeFavouritesIE), oauth2 (YoutubeIE), oauth2 (YoutubeMusicSearchURLIE), oauth2 (YoutubeNotificationsIE), oauth2 (YoutubeSearchDateIE), oauth2 (YoutubeSearchIE), oauth2 (YoutubeSearchURLIE), oauth2 (YoutubeTabBaseInfoExtractor), oauth2 (YoutubeTabIE)
[debug] Plugin directories: ['/home/elias/.local/lib/python3.11/site-packages/yt_dlp_plugins']
[debug] Loaded 1810 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: [email protected] from yt-dlp/yt-dlp
yt-dlp is up to date ([email protected] from yt-dlp/yt-dlp)
[TikTok] Extracting URL: https://www.tiktok.com/@_christinank_/video/7132898898951130374
[debug] [TikTok] {'app_name': 'musical_ly', 'app_version': '34.1.2', 'manifest_app_version': '2023401020', 'aid': '0', 'iid': '7351153174894626592'}
[TikTok] 7132898898951130374: Downloading video feed
WARNING: [TikTok] Expecting value in '': line 1 column 1 (char 0). Retrying... (attempt 1 of 3)
[debug] [TikTok] {'app_name': 'musical_ly', 'app_version': '34.1.2', 'manifest_app_version': '2023401020', 'aid': '0', 'iid': '7351144126450059040'}
[TikTok] 7132898898951130374: Downloading video feed
WARNING: [TikTok] Expecting value in '': line 1 column 1 (char 0). Retrying... (attempt 2 of 3)
[debug] [TikTok] {'app_name': 'musical_ly', 'app_version': '34.1.2', 'manifest_app_version': '2023401020', 'aid': '0', 'iid': '7351149742343391009'}
[TikTok] 7132898898951130374: Downloading video feed
WARNING: [TikTok] 7132898898951130374: Failed to parse JSON (caused by JSONDecodeError("Expecting value in '': line 1 column 1 (char 0)")); trying with webpage
[TikTok] 7132898898951130374: Downloading webpage
[debug] [TikTok] Found universal data for rehydration
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, size, br, asr, proto, vext, aext, hasaud, source, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] 7132898898951130374: Downloading 1 format(s): download                                                                                                                 
[debug] Invoking http downloader on "https://webapp-va.tiktok.com/79acefad3aeb041c6f8a30aade108efa/662bad09/kmoat/mps/logo/v2/r/p/v09044g40000cbuib6bc77ua76706mcg/794af6f7a0b04579b0238cbaf29bb11e/b80299d3afefbf670db61bbb1b67e8c5/mp4/main.mp4?a=1988&bti=ODszNWYuMDE6&ch=0&cr=3&dr=0&lr=tiktok_m&cd=0%7C0%7C1%7C&cv=1&br=0&bt=0&cs=0&ds=3&ft=piBEGMvh8Zmo0lwzC-4jV3ChrpWrKsd.&mime_type=video_mp4&qs=0&rc=NXZpTGRTaFBnKXVmZXpud2xAKTRlPGllOzVlOjdlZGlpNzpnKWY5Ojp4OmVleGYzM2o3PHl5U2xrdmlxRDpqYmwrYitsaHFgYi5fL15gMC02Mi0tNDNeNjpjZGotM140YDNmXy0tMTEtLTo%3D&btag=e00088000&definition=720p&item_id=7132898898951130374&l=2024042607324791C4A7DA88DE3A0407CC&logo_type=tiktok_m&ply_type=2&policy=eyJ2bSI6MiwiY2siOiJ0dF9jaGFpbl90b2tlbiJ9&user_text=_christinank_"
ERROR: unable to download video data: HTTP Error 403: Forbidden
Traceback (most recent call last):                                                                                                                                            
  File "/usr/local/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 3448, in process_info                                                                                                
    success, real_download = self.dl(temp_filename, info_dict)                                                                                                                
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                
  File "/usr/local/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 3169, in dl                                                                                                          
    return fd.download(name, new_info, subtitle)                                                                                                                              
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                              
  File "/usr/local/bin/yt-dlp/yt_dlp/downloader/common.py", line 466, in download                                                                                             
    ret = self.real_download(filename, info_dict)                                                                                                                             
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                             
  File "/usr/local/bin/yt-dlp/yt_dlp/downloader/http.py", line 369, in real_download                                                                                          
    establish_connection()                                                                                                                                                    
  File "/usr/local/bin/yt-dlp/yt_dlp/downloader/http.py", line 120, in establish_connection                                                                                   
    ctx.data = self.ydl.urlopen(request)                                                                                                                                      
               ^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                      
  File "/usr/local/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 4131, in urlopen                                                                                                     
    return self._request_director.send(req)                                                                                                                                   
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                   
  File "/usr/local/bin/yt-dlp/yt_dlp/networking/common.py", line 115, in send                                                                                                 
    response = handler.send(request)                                                                                                                                          
               ^^^^^^^^^^^^^^^^^^^^^                                                                                                                                          
  File "/usr/local/bin/yt-dlp/yt_dlp/networking/_helper.py", line 208, in wrapper                                                                                             
    return func(self, *args, **kwargs)                                                                                                                                        
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                        
  File "/usr/local/bin/yt-dlp/yt_dlp/networking/common.py", line 335, in send                                                                                                 
    return self._send(request)                                                                                                                                                
           ^^^^^^^^^^^^^^^^^^^                                                                                                                                                
  File "/usr/local/bin/yt-dlp/yt_dlp/networking/_requests.py", line 350, in _send                                                                                             
    raise HTTPError(res, redirect_loop=max_redirects_exceeded)                                                                                                                
yt_dlp.networking.exceptions.HTTPError: HTTP Error 403: Forbidden
@estatistics estatistics added site-bug Issue with a specific website triage Untriaged issue labels Apr 26, 2024
@bashonly bashonly changed the title yt-dlp says forbidden video for tiktok video while it is playable in browser [tiktok] HTTP Error 403: Forbidden when downloading web formats for some videos Apr 26, 2024
@bashonly bashonly removed the triage Untriaged issue label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site-bug Issue with a specific website
Projects
None yet
Development

No branches or pull requests

2 participants