P
P
pixal2016-02-17 12:47:41
YouTube
pixal, 2016-02-17 12:47:41

How can one get a direct link to a YouTube video in Python?

Hi everybody. There are programs that, if you feed a link to a video on YouTube, VK, they can get a direct link to the video without working with the API. I.e. They kind of launch a video and look where the resource redirects them and in this way get a direct link. FireBug works in much the same way. Can you please tell me how this can be done in Python?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Kuts, 2016-02-17
@fox_12

Here is the finished project:
https://github.com/rg3/youtube-dl
actually it shows how this is implemented in Python

D
Dimonchik, 2016-02-17
@dimonchik2013

www.telerik.com/fiddler
look, analyze, everything is visible there quickly
yt-subs.afut.in immediately and the subtitles are extracted
to Python - you get the page (urllib, requests, curl - it doesn’t matter), you find the desired URL with regclares or xpath - profit

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question