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 video: output MP4 video url #17233

Closed
Kikobeats opened this issue Aug 13, 2018 · 2 comments
Closed

Twitter video: output MP4 video url #17233

Kikobeats opened this issue Aug 13, 2018 · 2 comments

Comments

@Kikobeats
Copy link

@Kikobeats Kikobeats commented Aug 13, 2018

Hello,

I noted that the Twitte extractor is extracting the video URL after following an authorization flow. It is well expplained at this comment: #12726 (comment)

This workflow is reflected using verbose mode

❯ $ youtube-dl https://twitter.com/NBA/status/1027698539969708032 -v
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'https://twitter.com/NBA/status/1027698539969708032', u'-v']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.08.04
[debug] Python version 2.7.15 (CPython) - Darwin-17.6.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 4.0.1, ffprobe 4.0.1
[debug] Proxy map: {}
[twitter] 1027698539969708032: Downloading webpage
[twitter:card] 1027698539969708032: Downloading webpage
[twitter:card] 1027698539969708032: Downloading guest token
[twitter:card] 1027698539969708032: Downloading JSON metadata
[twitter:card] 1027698539969708032: Downloading m3u8 information
...

However, the mp4 video URL is not present in the output if you use -g/--get-url:

❯ $ youtube-dl https://twitter.com/NBA/status/1027698539969708032 -v -g
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'https://twitter.com/NBA/status/1027698539969708032', u'-v', u'-g']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.08.04
[debug] Python version 2.7.15 (CPython) - Darwin-17.6.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 4.0.1, ffprobe 4.0.1
[debug] Proxy map: {}
[debug] Default format spec: bestvideo+bestaudio/best
https://video.twimg.com/amplify_video/1027642132553719808/pl/640x640/mQM7T8NJsCmQFa9M.m3u8

or -j/--dump-json flag:

❯ $ youtube-dl https://twitter.com/NBA/status/1027698539969708032 -v -j
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'https://twitter.com/NBA/status/1027698539969708032', u'-v', u'-j']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.08.04
[debug] Python version 2.7.15 (CPython) - Darwin-17.6.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 4.0.1, ffprobe 4.0.1
[debug] Proxy map: {}
[debug] Default format spec: bestvideo+bestaudio/best

I suppose this is happening because under these flags the flow exited early, without evaluating the necessary code for extracting the real video url.

Could be possible to include the logic to output the mp4 URL properly?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 14, 2018

No mp4 is available for this video.

@dstftw dstftw closed this Aug 14, 2018
@Kikobeats
Copy link
Author

@Kikobeats Kikobeats commented Aug 14, 2018

@dstftw I don't understand, you are getting the mp4 video url because you download it, right? Just run the process under the rest of situations

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
2 participants
You can’t perform that action at this time.