-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support SyFy Full Episodes #3820
Comments
This URL now redirects http://www.syfy.com/episodes. Do you have another example URL? |
the video requires an account. this video doesn't require an account(http://www.syfy.com/12monkeys/videos/201-year-of-the-monkey) but for some reason i get 403 when i try to watch it or download it. diff --git a/youtube_dl/extractor/syfy.py b/youtube_dl/extractor/syfy.py
index 5ca079f..0d49c08 100644
--- a/youtube_dl/extractor/syfy.py
+++ b/youtube_dl/extractor/syfy.py
@@ -1,12 +1,14 @@
from __future__ import unicode_literals
-import re
-
from .common import InfoExtractor
+from ..utils import (
+ update_url_query,
+ smuggle_url,
+)
class SyfyIE(InfoExtractor):
- _VALID_URL = r'https?://www\.syfy\.com/(?:videos/.+?vid:(?P<id>[0-9]+)|(?!videos)(?P<video_name>[^/]+)(?:$|[?#]))'
+ _VALID_URL = r'https?://www\.syfy\.com/(?:[^/]+/)?videos/(?P<id>[^/?#]+)'
_TESTS = [{
'url': 'http://www.syfy.com/videos/Robot%20Combat%20League/Behind%20the%20Scenes/vid:2631458',
@@ -31,16 +33,19 @@ class SyfyIE(InfoExtractor):
}]
def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
- video_name = mobj.group('video_name')
- if video_name:
- generic_webpage = self._download_webpage(url, video_name)
- video_id = self._search_regex(
- r'<iframe.*?class="video_iframe_page"\s+src="/_utils/video/thP_video_controller.php.*?_vid([0-9]+)">',
- generic_webpage, 'video ID')
- url = 'http://www.syfy.com/videos/%s/%s/vid:%s' % (
- video_name, video_name, video_id)
- else:
- video_id = mobj.group('id')
- webpage = self._download_webpage(url, video_id)
- return self.url_result(self._og_search_video_url(webpage))
+ display_id = self._match_id(url)
+ webpage = self._download_webpage(url, display_id)
+ syfy_mpx = list(self._parse_json(self._search_regex(
+ r'jQuery\.extend\([^,]+,\s*({.+})\);', webpage, 'drupal settings'),
+ display_id)['syfy']['syfy_mpx'].values())[0]
+ return {
+ '_type': 'url_transparent',
+ 'ie_key': 'ThePlatform',
+ 'url': smuggle_url(update_url_query(self._proto_relative_url(
+ syfy_mpx['releaseURL']), {
+ 'mbr': 'true',
+ 'manifest': 'm3u',
+ }), {'force_smil_url': True}),
+ 'title': syfy_mpx['episodeTitle'],
+ 'id': syfy_mpx['mpxGUID'],
+ } |
I guess what i don't understand is why the 1080p version I got from syfy after logging in to a cable provider is only half the size of a scene rls. |
The text was updated successfully, but these errors were encountered: