handle YT urls with #/ redirects (closes #484)
authorFilippo Valsorda <filippo.valsorda@gmail.com>
Mon, 22 Oct 2012 07:15:27 +0000 (09:15 +0200)
committerFilippo Valsorda <filippo.valsorda@gmail.com>
Mon, 22 Oct 2012 07:15:27 +0000 (09:15 +0200)
youtube_dl/InfoExtractors.py

index 88973cce8982b70a57039a26208a9c647474160f..c35b68b8fc7dabea2733ce56a5a5f58f98e835ca 100644 (file)
@@ -102,6 +102,7 @@ class YoutubeIE(InfoExtractor):
                             (?:https?://)?                                       # http(s):// (optional)
                             (?:youtu\.be/|(?:\w+\.)?youtube(?:-nocookie)?\.com/|
                                tube\.majestyc\.net/)                             # the various hostnames, with wildcard subdomains
+                            (?:.*?\#/)?                                          # handle anchor (#/) redirect urls
                             (?!view_play_list|my_playlists|artist|playlist)      # ignore playlist URLs
                             (?:                                                  # the various things that can precede the ID:
                                 (?:(?:v|embed|e)/)                               # v/ or embed/ or e/