summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSergey M․ <[email protected]>2014-08-08 18:48:10 +0700
committerSergey M․ <[email protected]>2014-08-08 18:48:10 +0700
commit1cccc41ddcbfd509a9cd9220eaf9a50518bf9046 (patch)
treea5f2a3cdfa7cdffb9c0d9f799d3e6cd425448b99
parenta91cf277672318e942af891d6c962c053abda45d (diff)
parent64d02399d8d2acbb55b22f789a5b54e79591b7b3 (diff)
downloadyoutube-dl-1cccc41ddcbfd509a9cd9220eaf9a50518bf9046.tar.gz
youtube-dl-1cccc41ddcbfd509a9cd9220eaf9a50518bf9046.zip
Merge branch 'xboxclips' of https://github.com/pyed/youtube-dl into pyed-xboxclips
-rw-r--r--youtube_dl/extractor/__init__.py1
-rw-r--r--youtube_dl/extractor/xboxclips.py34
2 files changed, 35 insertions, 0 deletions
diff --git a/youtube_dl/extractor/__init__.py b/youtube_dl/extractor/__init__.py
index 468c7dc29..23f53ba13 100644
--- a/youtube_dl/extractor/__init__.py
+++ b/youtube_dl/extractor/__init__.py
@@ -384,6 +384,7 @@ from .wistia import WistiaIE
from .worldstarhiphop import WorldStarHipHopIE
from .wrzuta import WrzutaIE
from .xbef import XBefIE
+from .xboxclips import XboxClipsIE
from .xhamster import XHamsterIE
from .xnxx import XNXXIE
from .xvideos import XVideosIE
diff --git a/youtube_dl/extractor/xboxclips.py b/youtube_dl/extractor/xboxclips.py
new file mode 100644
index 000000000..499702d0d
--- /dev/null
+++ b/youtube_dl/extractor/xboxclips.py
@@ -0,0 +1,34 @@
+# encoding: utf-8
+import re
+
+from .common import InfoExtractor
+
+class XboxClipsIE(InfoExtractor):
+ _VALID_URL = r'^https?://(www\.)?xboxclips\.com/video.php\?.*vid=(?P<id>[\w-]*)'
+ _TEST = {
+ 'url': 'https://xboxclips.com/video.php?uid=2533274823424419&gamertag=Iabdulelah&vid=074a69a9-5faf-46aa-b93b-9909c1720325',
+ 'md5': 'fbe1ec805e920aeb8eced3c3e657df5d',
+ 'info_dict': {
+ 'id': '074a69a9-5faf-46aa-b93b-9909c1720325',
+ 'ext': 'mp4',
+ 'title': 'Iabdulelah playing Upload Studio',
+ }
+ }
+
+ def _real_extract(self, url):
+ mobj = re.match(self._VALID_URL, url)
+ video_id = mobj.group('id')
+
+ webpage = self._download_webpage(url, video_id)
+ video_url = self._search_regex(r'Link.*?"(.*?)"',
+ webpage, 'video URL')
+
+ video_title = self._html_search_regex(r'<title>.*?\|(.*?)<',
+ webpage, 'title')
+
+ return {
+ 'id': video_id,
+ 'url': video_url,
+ 'title': video_title,
+ 'ext': 'mp4',
+ }