aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/vimeo.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-10-15 12:05:13 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2013-10-15 12:05:13 +0200
commit9d4660cab15f374176f87d3f747a559142e4af9b (patch)
tree6b3fe1b19cc7ca4c8123a0e0dcd80508105f5028 /youtube_dl/extractor/vimeo.py
parentcd054fc491198a5a7c69d76f19693b1cd4d5c086 (diff)
downloadyoutube-dl-9d4660cab15f374176f87d3f747a559142e4af9b.tar.xz
[generic] Support embedded vimeo videos (#1602)
Diffstat (limited to 'youtube_dl/extractor/vimeo.py')
-rw-r--r--youtube_dl/extractor/vimeo.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/youtube_dl/extractor/vimeo.py b/youtube_dl/extractor/vimeo.py
index cea29f035..2de56ac81 100644
--- a/youtube_dl/extractor/vimeo.py
+++ b/youtube_dl/extractor/vimeo.py
@@ -11,6 +11,7 @@ from ..utils import (
get_element_by_attribute,
ExtractorError,
std_headers,
+ unsmuggle_url,
)
class VimeoIE(InfoExtractor):
@@ -53,7 +54,7 @@ class VimeoIE(InfoExtractor):
u'title': u'Kathy Sierra: Building the minimum Badass User, Business of Software',
u'uploader': u'The BLN & Business of Software',
},
- },
+ }
]
def _login(self):
@@ -98,6 +99,12 @@ class VimeoIE(InfoExtractor):
self._login()
def _real_extract(self, url, new_video=True):
+ url, data = unsmuggle_url(url)
+ headers = std_headers
+ if data is not None:
+ headers = headers.copy()
+ headers.update(data)
+
# Extract ID from URL
mobj = re.match(self._VALID_URL, url)
if mobj is None:
@@ -112,7 +119,7 @@ class VimeoIE(InfoExtractor):
url = 'https://vimeo.com/' + video_id
# Retrieve video webpage to extract further information
- request = compat_urllib_request.Request(url, None, std_headers)
+ request = compat_urllib_request.Request(url, None, headers)
webpage = self._download_webpage(request, video_id)
# Now we begin extracting as much information as we can from what we