Added support for Dropbox
authorsahutd <sahutd@gmail.com>
Sun, 19 Jan 2014 04:50:26 +0000 (10:20 +0530)
committersahutd <sahutd@gmail.com>
Sun, 19 Jan 2014 04:50:26 +0000 (10:20 +0530)
youtube_dl/extractor/__init__.py
youtube_dl/extractor/dropbox.py

index 81c06b58632cf1d21c3c3b8f9a5bda87008a5427..5605e917be2f88066b6424ec806c54b19466cbf5 100644 (file)
@@ -47,7 +47,7 @@ from .depositfiles import DepositFilesIE
 from .dotsub import DotsubIE
 from .dreisat import DreiSatIE
 from .defense import DefenseGouvFrIE
-from .dropbox import DropBoxIE
+from .dropbox import DropboxIE
 from .ebaumsworld import EbaumsWorldIE
 from .ehow import EHowIE
 from .eighttracks import EightTracksIE
index 0df025cd33b56465cd10576feaf84b73cd757bf8..e4d60d17af353a3e300c16185e740f15ad31b511 100644 (file)
@@ -5,13 +5,15 @@ import re
 
 from .common import InfoExtractor
 
-class DropBoxIE(InfoExtractor):
-    _VALID_URL = r'https?://(?:www\.)?dropbox.com/s/(?P<id>[a-zA-Z0-9]{15})/(?P<title>.*)'
+class DropboxIE(InfoExtractor):
+    _VALID_URL = r'https?://(?:www\.)?dropbox[.]com/s/(?P<id>[a-zA-Z0-9]{15})/(?P<title>[^?#]*)'
     _TEST = {
-        'url': 'https://www.dropbox.com/s/mcnzehi9wo55th4/20131219_085616.mp4',
-        'file': '20131219_085616.mp4',
-        'md5': '2cec58eb277054eca0dbaaf3bdc72564',
-        
+        u'url': u'https://www.dropbox.com/s/mcnzehi9wo55th4/20131219_085616.mp4',
+        u'file': u'mcnzehi9wo55th4.mp4',
+        u'md5': u'2cec58eb277054eca0dbaaf3bdc72564',
+        u'info_dict': {
+            u'title': '20131219_085616'
+        }
     }
     
     
@@ -24,10 +26,7 @@ class DropBoxIE(InfoExtractor):
         return{
                'id':video_id,
                'title':title,
-               'formats': [{
-                            'url': video_url,
-                            'vcodec': 'none',
-                          }]
+               'url':video_url
                
                }
         
\ No newline at end of file