Merge branch 'master' of github.com:rg3/youtube-dl
authorPhilipp Hagemeister <phihag@phihag.de>
Sat, 13 Dec 2014 22:05:28 +0000 (23:05 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Sat, 13 Dec 2014 22:05:28 +0000 (23:05 +0100)
AUTHORS
youtube_dl/extractor/__init__.py
youtube_dl/extractor/bandcamp.py
youtube_dl/extractor/restudy.py [new file with mode: 0644]

diff --git a/AUTHORS b/AUTHORS
index bfa00f91ba6e3cf9fc1762ad81a56f11501d2390..5d45e02fca70bf57e8e57014b0f851dd9117eb34 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -92,3 +92,4 @@ Tithen-Firion
 Zack Fernandes
 cryptonaut
 Adrian Kretz
+Mathias Rav
index 119ec2044efca360652008105e27772b4fc13033..3ae7a8a527fb024219191b5e933ef3c7e8d3413f 100644 (file)
@@ -316,6 +316,7 @@ from .radiofrance import RadioFranceIE
 from .rai import RaiIE
 from .rbmaradio import RBMARadioIE
 from .redtube import RedTubeIE
+from .restudy import RestudyIE
 from .reverbnation import ReverbNationIE
 from .ringtv import RingTVIE
 from .ro220 import Ro220IE
index 9fb770cb1562f6efbe004d4b1689bf3aa1eab8d4..bcb2821cd2b78fdd36b279be0e25aebb9084095d 100644 (file)
@@ -106,7 +106,7 @@ class BandcampIE(InfoExtractor):
 
 class BandcampAlbumIE(InfoExtractor):
     IE_NAME = 'Bandcamp:album'
-    _VALID_URL = r'https?://(?:(?P<subdomain>[^.]+)\.)?bandcamp\.com(?:/album/(?P<title>[^?#]+))'
+    _VALID_URL = r'https?://(?:(?P<subdomain>[^.]+)\.)?bandcamp\.com(?:/album/(?P<title>[^?#]+))?'
 
     _TESTS = [{
         'url': 'http://blazo.bandcamp.com/album/jazz-format-mixtape-vol-1',
@@ -141,6 +141,12 @@ class BandcampAlbumIE(InfoExtractor):
             'title': 'Hierophany of the Open Grave',
         },
         'playlist_mincount': 9,
+    }, {
+        'url': 'http://dotscale.bandcamp.com',
+        'info_dict': {
+            'title': 'Loom',
+        },
+        'playlist_mincount': 7,
     }]
 
     def _real_extract(self, url):
diff --git a/youtube_dl/extractor/restudy.py b/youtube_dl/extractor/restudy.py
new file mode 100644 (file)
index 0000000..b17c2bf
--- /dev/null
@@ -0,0 +1,40 @@
+# coding: utf-8
+from __future__ import unicode_literals
+
+from .common import InfoExtractor
+
+
+class RestudyIE(InfoExtractor):
+    _VALID_URL = r'https?://(?:www\.)?restudy\.dk/video/play/id/(?P<id>[0-9]+)'
+    _TEST = {
+        'url': 'https://www.restudy.dk/video/play/id/1637',
+        'info_dict': {
+            'id': '1637',
+            'ext': 'flv',
+            'title': 'Leiden-frosteffekt',
+            'description': 'Denne video er et eksperiment med flydende kvælstof.',
+        },
+        'params': {
+            # rtmp download
+            'skip_download': True,
+        }
+    }
+
+    def _real_extract(self, url):
+        video_id = self._match_id(url)
+
+        webpage = self._download_webpage(url, video_id)
+
+        title = self._og_search_title(webpage).strip()
+        description = self._og_search_description(webpage).strip()
+
+        formats = self._extract_smil_formats(
+            'https://www.restudy.dk/awsmedia/SmilDirectory/video_%s.xml' % video_id,
+            video_id)
+
+        return {
+            'id': video_id,
+            'title': title,
+            'description': description,
+            'formats': formats,
+        }