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

add --wait-for-video suport twitter/x #8473

Closed
7 of 9 tasks
www2000 opened this issue Oct 29, 2023 · 0 comments · Fixed by #8475
Closed
7 of 9 tasks

add --wait-for-video suport twitter/x #8473

www2000 opened this issue Oct 29, 2023 · 0 comments · Fixed by #8475
Assignees
Labels
site-enhancement Feature request for some website

Comments

@www2000
Copy link

www2000 commented Oct 29, 2023

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

Provide a description that is worded well enough to be understood

Twiiter have from today a support for schedule a livestream.
for testing you can see this one (live at 00:00 GMT) https://twitter.com/i/broadcasts/1ynKOygEOPyJR

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 --wait-for-video 0 --cookies-from-browser firefox https://twitter.com/i/broadcasts/1ynKOygEOPyJR
[debug] Command-line config: ['-vU', '--wait-for-video', '0', '--cookies-from-browser', 'firefox', 'https://twitter.com/i/broadcasts/1ynKOygEOPyJR']
[debug] User config "/home/user-name/.config/yt-dlp/config": []
Extracting cookies from firefox
[debug] Extracting cookies from: "/home/user-name/.mozilla/firefox/<firefoxID>.default/cookies.sqlite"
Extracted 2816 cookies from firefox
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.10.13 [b634ba742] (pip)
[debug] Python 3.10.12 (CPython x86_64 64bit) - Linux-6.2.0-35-generic-x86_64-with-glibc2.35 (OpenSSL 3.0.2 15 Mar 2022, glibc 2.35)
[debug] exe versions: ffmpeg 4.4.2 (setts), ffprobe 4.4.2, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.11.0, brotli-1.0.9, certifi-2020.06.20, mutagen-1.45.1, pyxattr-0.7.2, secretstorage-3.3.1, sqlite3-3.37.2, websockets-9.1
[debug] Proxy map: {}
[debug] Loaded 1890 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Available version: stable@2023.10.13, Current version: stable@2023.10.13
yt-dlp is up to date (stable@2023.10.13)
[twitter:broadcast] Extracting URL: https://twitter.com/i/broadcasts/1ynKOygEOPyJR
[twitter:broadcast] 1ynKOygEOPyJR: Downloading legacy API JSON
[twitter:broadcast] 28_1718025875026042880: Downloading legacy API JSON
ERROR: [twitter:broadcast] 1ynKOygEOPyJR: Unable to download JSON metadata: HTTP Error 404: Not Found (caused by <HTTPError 404: Not Found>); 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 "/home/user-name/.local/lib/python3.10/site-packages/yt_dlp/extractor/common.py", line 715, in extract
    ie_result = self._real_extract(url)
  File "/home/user-name/.local/lib/python3.10/site-packages/yt_dlp/extractor/twitter.py", line 1589, in _real_extract
    source = self._call_api(
  File "/home/user-name/.local/lib/python3.10/site-packages/yt_dlp/extractor/twitter.py", line 312, in _call_api
    result = self._download_json(
  File "/home/user-name/.local/lib/python3.10/site-packages/yt_dlp/extractor/common.py", line 1069, in download_content
    res = getattr(self, download_handle.__name__)(url_or_request, video_id, **kwargs)
  File "/home/user-name/.local/lib/python3.10/site-packages/yt_dlp/extractor/common.py", line 1033, in download_handle
    res = self._download_webpage_handle(
  File "/home/user-name/.local/lib/python3.10/site-packages/yt_dlp/extractor/common.py", line 903, in _download_webpage_handle
    urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal, data=data, headers=headers, query=query, expected_status=expected_status)
  File "/home/user-name/.local/lib/python3.10/site-packages/yt_dlp/extractor/common.py", line 860, in _request_webpage
    raise ExtractorError(errmsg, cause=err)

  File "/home/user-name/.local/lib/python3.10/site-packages/yt_dlp/networking/_urllib.py", line 410, in _send
    res = opener.open(urllib_req, timeout=float(request.extensions.get('timeout') or self.timeout))
  File "/usr/lib/python3.10/urllib/request.py", line 525, in open
    response = meth(req, response)
  File "/usr/lib/python3.10/urllib/request.py", line 634, in http_response
    response = self.parent.error(
  File "/usr/lib/python3.10/urllib/request.py", line 563, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.10/urllib/request.py", line 643, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/user-name/.local/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 4051, in urlopen
    return self._request_director.send(req)
  File "/home/user-name/.local/lib/python3.10/site-packages/yt_dlp/networking/common.py", line 114, in send
    response = handler.send(request)
  File "/home/user-name/.local/lib/python3.10/site-packages/yt_dlp/networking/_helper.py", line 204, in wrapper
    return func(self, *args, **kwargs)
  File "/home/user-name/.local/lib/python3.10/site-packages/yt_dlp/networking/common.py", line 325, in send
    return self._send(request)
  File "/home/user-name/.local/lib/python3.10/site-packages/yt_dlp/networking/_urllib.py", line 415, in _send
    raise HTTPError(UrllibResponseAdapter(e.fp), redirect_loop='redirect error' in str(e)) from e
yt_dlp.networking.exceptions.HTTPError: HTTP Error 404: Not Found

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/user-name/.local/lib/python3.10/site-packages/yt_dlp/extractor/common.py", line 847, in _request_webpage
    return self._downloader.urlopen(self._create_request(url_or_request, data, headers, query))
  File "/home/user-name/.local/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 4070, in urlopen
    raise _CompatHTTPError(e) from e
yt_dlp.networking.exceptions._CompatHTTPError: HTTP Error 404: Not Found
@www2000 www2000 added enhancement New feature or request triage Untriaged issue labels Oct 29, 2023
@bashonly bashonly added site-enhancement Feature request for some website and removed enhancement New feature or request triage Untriaged issue labels Oct 29, 2023
@bashonly bashonly self-assigned this Oct 30, 2023
bashonly added a commit to bashonly/yt-dlp that referenced this issue Oct 30, 2023
bashonly added a commit that referenced this issue Nov 11, 2023
aalsuwaidi pushed a commit to aalsuwaidi/yt-dlp that referenced this issue Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site-enhancement Feature request for some website
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants