[movshare] Add support for movshare.net
authorSergey M․ <dstftw@gmail.com>
Sat, 5 Apr 2014 09:09:03 +0000 (16:09 +0700)
committerSergey M․ <dstftw@gmail.com>
Sat, 5 Apr 2014 09:09:03 +0000 (16:09 +0700)
youtube_dl/extractor/__init__.py
youtube_dl/extractor/movshare.py [new file with mode: 0644]

index f8de85b27aa4eee9cf74fb22a7164de6c586986e..689f94f6778e9f7faaa289639e622cd38f4d15a6 100644 (file)
@@ -156,6 +156,7 @@ from .mofosex import MofosexIE
 from .mooshare import MooshareIE
 from .morningstar import MorningstarIE
 from .motorsport import MotorsportIE
+from .movshare import MovShareIE
 from .mtv import (
     MTVIE,
     MTVIggyIE,
diff --git a/youtube_dl/extractor/movshare.py b/youtube_dl/extractor/movshare.py
new file mode 100644 (file)
index 0000000..2cf8b64
--- /dev/null
@@ -0,0 +1,26 @@
+from __future__ import unicode_literals
+
+from .novamov import NovaMovIE
+
+
+class MovShareIE(NovaMovIE):
+    IE_NAME = 'movshare'
+    IE_DESC = 'MovShare'
+
+    _VALID_URL = NovaMovIE._VALID_URL_TEMPLATE % {'host': 'movshare\.(?:net|sx)'}
+
+    _HOST = 'www.movshare.net'
+
+    _TITLE_REGEX = r'<strong>Title:</strong> ([^<]+)</p>'
+    _DESCRIPTION_REGEX = r'<strong>Description:</strong> ([^<]+)</p>'
+
+    _TEST = {
+        'url': 'http://www.movshare.net/video/559e28be54d96',
+        'md5': 'abd31a2132947262c50429e1d16c1bfd',
+        'info_dict': {
+            'id': '559e28be54d96',
+            'ext': 'flv',
+            'title': 'dissapeared image',
+            'description': 'optical illusion  dissapeared image  magic illusion',
+        }
+    }
\ No newline at end of file