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

Twitter unsupported URL error #24896

Open
dmitriykalmykov opened this issue Apr 20, 2020 · 3 comments
Open

Twitter unsupported URL error #24896

dmitriykalmykov opened this issue Apr 20, 2020 · 3 comments

Comments

@dmitriykalmykov
Copy link

@dmitriykalmykov dmitriykalmykov commented Apr 20, 2020

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2020.03.24
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar issues including closed ones

Verbose log

youtube-dl.exe -v "https://twitter.com/VictorKvert2008/statuses/1251621111357456384"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://twitter.com/VictorKvert2008/statuses/1251621111357456384']
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
[debug] youtube-dl version 2020.03.08
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.18362
[debug] exe versions: none
[debug] Proxy map: {}
[generic] 1251621111357456384: Requesting header
WARNING: Falling back on generic information extractor.
[generic] 1251621111357456384: Downloading webpage
[generic] 1251621111357456384: Extracting information
ERROR: Unsupported URL: https://twitter.com/VictorKvert2008/statuses/1251621111357456384
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp378onz6j\build\youtube_dl\YoutubeDL.py", line 797, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp378onz6j\build\youtube_dl\extractor\common.py", line 530, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmp378onz6j\build\youtube_dl\extractor\generic.py", line 3351, in _real_extract
youtube_dl.utils.UnsupportedError: Unsupported URL: https://twitter.com/VictorKvert2008/statuses/1251621111357456384

Description

Can't download some videos from Twitter (unsupported URL error).

@zanseb
Copy link

@zanseb zanseb commented Apr 20, 2020

Could you try with this url? https://twitter.com/i/status/1251621111357456384

It looks like that the currently used regex is not working as expected if the url contains statuses:

- https?://(?:(?:www|m(?:obile)?)\.)?twitter\.com/(?:(?:i/web|[^/]+)/status|statuses)/(?P<id>\d+)
+ https?://(?:(?:www|m(?:obile)?)\.)?twitter\.com/(?:(?:i/web|[^/]+)/(status|statuses))/(?P<id>\d+)

The regex seems to work after adding some round brackets around the or (status|statuses) condition.

@Oneboy1979
Copy link

@Oneboy1979 Oneboy1979 commented Apr 20, 2020

you need only the id so this regex is better:
https?://(?:(?:www|m(?:obile)?)\.)?twitter\.com/(?:(?:i/web|[^/]+)/(?:status|statuses))/(?P<id>\d+)

https://regex101.com/r/Fv38pg/6

regards Oneboy1979

@dmitriykalmykov
Copy link
Author

@dmitriykalmykov dmitriykalmykov commented Apr 20, 2020

Could you try with this url? https://twitter.com/i/status/1251621111357456384

Yes, this URL works. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.