Tweak the regexp to retrieve videos from embedded URLs #56

Closed
opened 2026-02-20 21:00:54 -05:00 by deekerman · 3 comments
Owner

Originally created by @rbrito on GitHub (Feb 17, 2011).

Hi.

Some time ago, I received a bugreport on the Debian Bug Tracking system (see bug 495164 asking for support for some youtube embedded URLs. I forwarded this issue to the bitbucket times, but they apparently got lost.

Anyway, the URL in question is quite long, but the essential part seems to be quite simple:

http://www.youtube.com/swf/l.swf?video_id=K2S2rQUETwc(:?.*)

Regards.

Originally created by @rbrito on GitHub (Feb 17, 2011). Hi. Some time ago, I received a bugreport on the Debian Bug Tracking system (see [bug 495164](http://bugs.debian.org/495164) asking for support for some youtube embedded URLs. I forwarded this issue to the bitbucket times, but they apparently got lost. Anyway, the URL in question [is quite long](http://www.youtube.com/swf/l.swf?video_id=K2S2rQUETwc&rel=1&eurl=http%3A//www.borza.ro/index.php/gestures&iurl=http%3A//i4.ytimg.com/vi/K2S2rQUETwc/default.jpg&t=OEgsToPDskJbcI6bdi_if83nM7mO8cYa&use_get_video_info=1&load_modules=1&fs=1&hl=en), but the essential part seems to be quite simple: ``` http://www.youtube.com/swf/l.swf?video_id=K2S2rQUETwc(:?.*) ``` Regards.
Author
Owner

@rg3 commented on GitHub (Feb 18, 2011):

rbrito,

The old issue was imported here when I migrated the project. You can find it here.

https://github.com/rg3/youtube-dl/issues/closed/#issue/9

The same comments still apply. I need a use case for those URLs. I don't know if they're still in use, but I could not find any easily.

Thanks for keeping track of this.

@rg3 commented on GitHub (Feb 18, 2011): rbrito, The old issue was imported here when I migrated the project. You can find it here. https://github.com/rg3/youtube-dl/issues/closed/#issue/9 The same comments still apply. I need a use case for those URLs. I don't know if they're still in use, but I could not find any easily. Thanks for keeping track of this.
Author
Owner

@rbrito commented on GitHub (Feb 18, 2011):

Hi, Ricardo.

Sorry for not noticing the bugs brought with the migration. Anyway, the only use case that I have is one from that bug in Debian, which is this:

http://www.youtube.com/swf/l.swf?video_id=K2S2rQUETwc&rel=1&eurl=http%3A//www.borza.ro/index.php/gestures&iurl=http%3A//i4.ytimg.com/vi/K2S2rQUETwc/default.jpg&t=OEgsToPDskJbcI6bdi_if83nM7mO8cYa&use_get_video_info=1&load_modules=1&fs=1&hl=en

Quite a mouthful, if you ask me.

@rbrito commented on GitHub (Feb 18, 2011): Hi, Ricardo. Sorry for not noticing the bugs brought with the migration. Anyway, the only use case that I have is one from that bug in Debian, which is this: http://www.youtube.com/swf/l.swf?video_id=K2S2rQUETwc&rel=1&eurl=http%3A//www.borza.ro/index.php/gestures&iurl=http%3A//i4.ytimg.com/vi/K2S2rQUETwc/default.jpg&t=OEgsToPDskJbcI6bdi_if83nM7mO8cYa&use_get_video_info=1&load_modules=1&fs=1&hl=en Quite a mouthful, if you ask me.
Author
Owner

@rg3 commented on GitHub (Feb 19, 2011):

Yes, and the page it came from no longer appears to contain the embedded video, so we can't find out. Like I said, if you take a YouTube video, say...

http://www.youtube.com/watch?v=eVsmS9OelWg

(Disclaimer: I'm not a Real Madrid fan, I just got it from the front page :P).

And then click on the "Embed" button, to get the embedding code. You get:

<iframe title="YouTube video player" width="480" height="390" src="http://www.youtube.com/embed/eVsmS9OelWg" frameborder="0" allowfullscreen></iframe>

Or, if you mark "use old embed code", you get:

<object width="640" height="510"><param name="movie" value="http://www.youtube.com/v/eVsmS9OelWg?fs=1&amp;hl=en_US&amp;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/eVsmS9OelWg?fs=1&amp;hl=en_US&amp;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="510"></embed></object>

And both URLs work with youtube-dl currently.

$ youtube-dl -t 'http://www.youtube.com/embed/eVsmS9OelWg'
[youtube] Setting language
[youtube] eVsmS9OelWg: Downloading video webpage
[youtube] eVsmS9OelWg: Downloading video info webpage
[youtube] eVsmS9OelWg: Extracting video information
[download] Destination: Real_Madrid_el_Mejor_Club_del_Mundo-eVsmS9OelWg.flv
[download]   0.3% of 40.62M at  218.07k/s ETA 03:10

$ youtube-dl -t 'http://www.youtube.com/v/eVsmS9OelWg?fs=1&amp;hl=en_US&amp;rel=0'
[youtube] Setting language
[youtube] eVsmS9OelWg: Downloading video webpage
[youtube] eVsmS9OelWg: Downloading video info webpage
[youtube] eVsmS9OelWg: Extracting video information
[download] Destination: Real_Madrid_el_Mejor_Club_del_Mundo-eVsmS9OelWg.flv
[download]   1.5% of 40.74M at  789.81k/s ETA 00:52
@rg3 commented on GitHub (Feb 19, 2011): Yes, and the page it came from no longer appears to contain the embedded video, so we can't find out. Like I said, if you take a YouTube video, say... http://www.youtube.com/watch?v=eVsmS9OelWg (Disclaimer: I'm not a Real Madrid fan, I just got it from the front page :P). And then click on the "Embed" button, to get the embedding code. You get: ``` <iframe title="YouTube video player" width="480" height="390" src="http://www.youtube.com/embed/eVsmS9OelWg" frameborder="0" allowfullscreen></iframe> ``` Or, if you mark "use old embed code", you get: ``` <object width="640" height="510"><param name="movie" value="http://www.youtube.com/v/eVsmS9OelWg?fs=1&amp;hl=en_US&amp;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/eVsmS9OelWg?fs=1&amp;hl=en_US&amp;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="510"></embed></object> ``` And both URLs work with youtube-dl currently. ``` $ youtube-dl -t 'http://www.youtube.com/embed/eVsmS9OelWg' [youtube] Setting language [youtube] eVsmS9OelWg: Downloading video webpage [youtube] eVsmS9OelWg: Downloading video info webpage [youtube] eVsmS9OelWg: Extracting video information [download] Destination: Real_Madrid_el_Mejor_Club_del_Mundo-eVsmS9OelWg.flv [download] 0.3% of 40.62M at 218.07k/s ETA 03:10 $ youtube-dl -t 'http://www.youtube.com/v/eVsmS9OelWg?fs=1&amp;hl=en_US&amp;rel=0' [youtube] Setting language [youtube] eVsmS9OelWg: Downloading video webpage [youtube] eVsmS9OelWg: Downloading video info webpage [youtube] eVsmS9OelWg: Extracting video information [download] Destination: Real_Madrid_el_Mejor_Club_del_Mundo-eVsmS9OelWg.flv [download] 1.5% of 40.74M at 789.81k/s ETA 00:52 ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl#56
No description provided.