From 29aa67edfc9c5ed7a6680328af23f7d2d0c1b3f2 Mon Sep 17 00:00:00 2001 From: Dan Salmon Date: Sun, 18 Dec 2016 19:31:51 -0600 Subject: [PATCH 1/8] Create Seeso Extractor --- youtube_dl/extractor/extractors.py | 1 + youtube_dl/extractor/seeso.py | 102 +++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 youtube_dl/extractor/seeso.py diff --git a/youtube_dl/extractor/extractors.py b/youtube_dl/extractor/extractors.py index bcf9f1906..b530b89f4 100644 --- a/youtube_dl/extractor/extractors.py +++ b/youtube_dl/extractor/extractors.py @@ -807,6 +807,7 @@ from .screencast import ScreencastIE from .screencastomatic import ScreencastOMaticIE from .screenjunkies import ScreenJunkiesIE from .seeker import SeekerIE +from .seeso import SeesoIE from .senateisvp import SenateISVPIE from .sendtonews import SendtoNewsIE from .servingsys import ServingSysIE diff --git a/youtube_dl/extractor/seeso.py b/youtube_dl/extractor/seeso.py new file mode 100644 index 000000000..5e4bdce58 --- /dev/null +++ b/youtube_dl/extractor/seeso.py @@ -0,0 +1,102 @@ +# coding: utf-8 +from __future__ import unicode_literals + +from .common import InfoExtractor +import urlparse +import os.path +import json +from ..utils import ( + sanitized_Request, + urlencode_postdata +) + + +class SeesoIE(InfoExtractor): + _VALID_URL = r'https?://(?:www\.)?seeso\.com/view/episode/(?P[0-9]+)' + _TEST = { + # 'md5': 'TODO: md5 sum of the first 10241 bytes of the video file (use --test)', + # 'params': { + # 'username': 'emailhere', + # 'password': 'passwordhere' + # }, + 'url': 'https://www.seeso.com/view/episode/799241283849', + 'info_dict': { + # 'id': '799241283849', + # 'ext': 'mp4', + 'id': '42', + 'ext': 'mp4', + 'series': 'Bajillion Dollar Propertie$', + 'title': 'Farsi Lessons', + 'thumbnail': 'https://chaosic.akamaized.net/NBCOTT_-_Production/360/907/160831_3092487_Farsi_Lessons.jpg', + 'description': 'Amir leads Victoria into an embarrassing trap, the Bros meet an even more obnoxious bro ' + 'who’s looking for the ultimate sex pad, while rival brokers Serge and Gio decide to get ' + 'rough with Glenn.' + } + } + + def _real_extract(self, url): + # username, password = self._get_login_info() + # username = '' + # password = '' + video_id = self._match_id(url) + + # if username or password is None: + # return + + _API_AUTH_URL = "https://www.seeso.com/api/v3/auth/login" + auth_json = { + "username": 'emailhere', + "password": 'passwordhere', + "userOnly": True, + "isRememberMe": True, + "isWeb": True + } + # TODO Change JSON gets to .get() as referenced in readme + + # Send auth POST request and get token from response + auth_request = sanitized_Request(_API_AUTH_URL, urlencode_postdata(auth_json)) + auth_response = json.loads(self._download_webpage(auth_request, '', note='Getting auth token...')) + auth_token = auth_response['user']['token'] + + # Use the public unauthenticated API to get the video's info + _VIDEO_INFO_URL = 'https://feed.theplatform.com/f/NZILfC/nbcott-prod-all-media?byAvailabilityState=' \ + 'available&byId=%s&form=cjson' + request = sanitized_Request(_VIDEO_INFO_URL % video_id) + json_data = self._download_json(request, video_id) + entry = json_data.get('entries')[0] + + # Custom fields + public_url = entry["publicUrl"] + + # Template fields + series = entry["nbc-chaos$show"] # Show name + title = entry["nbc-chaos$shortTitle"] # Episode Name + season_number = entry["nbc-chaos$seasonNumber"] + episode_number = entry["nbc-chaos$episodeNumber"] + thumbnail = entry["defaultThumbnailUrl"] + description = entry["nbc-chaos$shortDescription"] + + # Got the show's public URL. Now we need to parse out the videoID + public_url_id = os.path.split(urlparse.urlparse(public_url).path)[-1] + + # Get the master m3u8 which lists formats + m3u8_url = 'https://link.theplatform.com/s/NZILfC/' \ + 'media/{0}?feed=All%20Media%20Feed&auth={1}&vpaid=script,flash' \ + '&formats=m3u,mpeg4'.format(public_url_id, auth_token) + formats = [] + for entry in self._extract_m3u8_formats(m3u8_url, video_id, m3u8_id='m3u8'): + formats.append(entry) + + self._sort_formats(formats) + + return { + 'id': video_id, + 'title': title, + 'thumbnail': thumbnail, + 'series': series, + 'season_number': season_number, + 'episode_number': episode_number, + 'description': description, + 'url': '', + 'formats': formats + } \ No newline at end of file From 1ee71f05b1933c2439ed5ed8521cf0ab952a53d1 Mon Sep 17 00:00:00 2001 From: Dan Salmon Date: Sun, 18 Dec 2016 21:05:16 -0600 Subject: [PATCH 2/8] Fix login --- youtube_dl/extractor/seeso.py | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/youtube_dl/extractor/seeso.py b/youtube_dl/extractor/seeso.py index 5e4bdce58..f2ff92f89 100644 --- a/youtube_dl/extractor/seeso.py +++ b/youtube_dl/extractor/seeso.py @@ -15,15 +15,13 @@ class SeesoIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?seeso\.com/view/episode/(?P[0-9]+)' _TEST = { # 'md5': 'TODO: md5 sum of the first 10241 bytes of the video file (use --test)', - # 'params': { - # 'username': 'emailhere', - # 'password': 'passwordhere' - # }, + 'params': { + 'username': 'emailhere', + 'password': 'passwordhere' + }, 'url': 'https://www.seeso.com/view/episode/799241283849', 'info_dict': { - # 'id': '799241283849', - # 'ext': 'mp4', - 'id': '42', + 'id': '799241283849', 'ext': 'mp4', 'series': 'Bajillion Dollar Propertie$', 'title': 'Farsi Lessons', @@ -35,18 +33,16 @@ class SeesoIE(InfoExtractor): } def _real_extract(self, url): - # username, password = self._get_login_info() - # username = '' - # password = '' + username, password = self._get_login_info() video_id = self._match_id(url) - # if username or password is None: - # return + if username is None or password is None: + return _API_AUTH_URL = "https://www.seeso.com/api/v3/auth/login" auth_json = { - "username": 'emailhere', - "password": 'passwordhere', + "username": username, + "password": password, "userOnly": True, "isRememberMe": True, "isWeb": True From 7402103241088d0d76862c42a440c4936f195677 Mon Sep 17 00:00:00 2001 From: Dan Salmon Date: Sun, 18 Dec 2016 22:28:09 -0600 Subject: [PATCH 3/8] Fix description and make test okay --- youtube_dl/extractor/seeso.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/youtube_dl/extractor/seeso.py b/youtube_dl/extractor/seeso.py index f2ff92f89..eed07e4a2 100644 --- a/youtube_dl/extractor/seeso.py +++ b/youtube_dl/extractor/seeso.py @@ -14,10 +14,9 @@ from ..utils import ( class SeesoIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?seeso\.com/view/episode/(?P[0-9]+)' _TEST = { - # 'md5': 'TODO: md5 sum of the first 10241 bytes of the video file (use --test)', 'params': { - 'username': 'emailhere', - 'password': 'passwordhere' + 'username': '', + 'password': '' }, 'url': 'https://www.seeso.com/view/episode/799241283849', 'info_dict': { @@ -25,10 +24,9 @@ class SeesoIE(InfoExtractor): 'ext': 'mp4', 'series': 'Bajillion Dollar Propertie$', 'title': 'Farsi Lessons', + 'description': 'Amir leads Victoria into a trap, the Bros meet a super obnoxious bro, ' \ + 'and rival brokers Serge and Gio intimidate Glenn.', 'thumbnail': 'https://chaosic.akamaized.net/NBCOTT_-_Production/360/907/160831_3092487_Farsi_Lessons.jpg', - 'description': 'Amir leads Victoria into an embarrassing trap, the Bros meet an even more obnoxious bro ' - 'who’s looking for the ultimate sex pad, while rival brokers Serge and Gio decide to get ' - 'rough with Glenn.' } } @@ -47,12 +45,11 @@ class SeesoIE(InfoExtractor): "isRememberMe": True, "isWeb": True } - # TODO Change JSON gets to .get() as referenced in readme # Send auth POST request and get token from response auth_request = sanitized_Request(_API_AUTH_URL, urlencode_postdata(auth_json)) auth_response = json.loads(self._download_webpage(auth_request, '', note='Getting auth token...')) - auth_token = auth_response['user']['token'] + auth_token = auth_response.get('user').get('token') # Use the public unauthenticated API to get the video's info _VIDEO_INFO_URL = 'https://feed.theplatform.com/f/NZILfC/nbcott-prod-all-media?byAvailabilityState=' \ @@ -80,7 +77,7 @@ class SeesoIE(InfoExtractor): 'media/{0}?feed=All%20Media%20Feed&auth={1}&vpaid=script,flash' \ '&formats=m3u,mpeg4'.format(public_url_id, auth_token) formats = [] - for entry in self._extract_m3u8_formats(m3u8_url, video_id, m3u8_id='m3u8'): + for entry in self._extract_m3u8_formats(m3u8_url, video_id, m3u8_id='m3u8', ext='mp4'): formats.append(entry) self._sort_formats(formats) @@ -95,4 +92,4 @@ class SeesoIE(InfoExtractor): 'description': description, 'url': '', 'formats': formats - } \ No newline at end of file + } From 04f9c9b5fbc622933eacf4f3de5d607a6d61014b Mon Sep 17 00:00:00 2001 From: Dan Salmon Date: Sun, 18 Dec 2016 23:09:11 -0600 Subject: [PATCH 4/8] [Seeso] Fix test description and consolidate --- youtube_dl/extractor/seeso.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/youtube_dl/extractor/seeso.py b/youtube_dl/extractor/seeso.py index eed07e4a2..9d2c3f15c 100644 --- a/youtube_dl/extractor/seeso.py +++ b/youtube_dl/extractor/seeso.py @@ -15,8 +15,8 @@ class SeesoIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?seeso\.com/view/episode/(?P[0-9]+)' _TEST = { 'params': { - 'username': '', - 'password': '' + 'username': 'emailhere', + 'password': 'passwordhere' }, 'url': 'https://www.seeso.com/view/episode/799241283849', 'info_dict': { @@ -24,8 +24,8 @@ class SeesoIE(InfoExtractor): 'ext': 'mp4', 'series': 'Bajillion Dollar Propertie$', 'title': 'Farsi Lessons', - 'description': 'Amir leads Victoria into a trap, the Bros meet a super obnoxious bro, ' \ - 'and rival brokers Serge and Gio intimidate Glenn.', + 'description': ("Amir leads Victoria into a trap, the Bros meet a super obnoxious bro, " + "and rival brokers Serge and Gio intimidate Glenn."), 'thumbnail': 'https://chaosic.akamaized.net/NBCOTT_-_Production/360/907/160831_3092487_Farsi_Lessons.jpg', } } @@ -58,9 +58,6 @@ class SeesoIE(InfoExtractor): json_data = self._download_json(request, video_id) entry = json_data.get('entries')[0] - # Custom fields - public_url = entry["publicUrl"] - # Template fields series = entry["nbc-chaos$show"] # Show name title = entry["nbc-chaos$shortTitle"] # Episode Name @@ -70,12 +67,11 @@ class SeesoIE(InfoExtractor): description = entry["nbc-chaos$shortDescription"] # Got the show's public URL. Now we need to parse out the videoID - public_url_id = os.path.split(urlparse.urlparse(public_url).path)[-1] + public_url_id = os.path.split(urlparse.urlparse(entry["publicUrl"]).path)[-1] # Get the master m3u8 which lists formats - m3u8_url = 'https://link.theplatform.com/s/NZILfC/' \ - 'media/{0}?feed=All%20Media%20Feed&auth={1}&vpaid=script,flash' \ - '&formats=m3u,mpeg4'.format(public_url_id, auth_token) + m3u8_url = 'https://link.theplatform.com/s/NZILfC/media/{0}?feed=All%20Media%20Feed&auth={1}' \ + '&vpaid=script,flash&formats=m3u,mpeg4'.format(public_url_id, auth_token) formats = [] for entry in self._extract_m3u8_formats(m3u8_url, video_id, m3u8_id='m3u8', ext='mp4'): formats.append(entry) From 61de17d4576287c3b51ab19edbdbc719753ae0b5 Mon Sep 17 00:00:00 2001 From: Dan Salmon Date: Mon, 19 Dec 2016 21:07:35 -0600 Subject: [PATCH 5/8] Remove urlparse dependency and switch to _download_json --- youtube_dl/extractor/seeso.py | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/youtube_dl/extractor/seeso.py b/youtube_dl/extractor/seeso.py index 9d2c3f15c..779b0ee64 100644 --- a/youtube_dl/extractor/seeso.py +++ b/youtube_dl/extractor/seeso.py @@ -2,9 +2,7 @@ from __future__ import unicode_literals from .common import InfoExtractor -import urlparse import os.path -import json from ..utils import ( sanitized_Request, urlencode_postdata @@ -16,7 +14,7 @@ class SeesoIE(InfoExtractor): _TEST = { 'params': { 'username': 'emailhere', - 'password': 'passwordhere' + 'password': 'passhere' }, 'url': 'https://www.seeso.com/view/episode/799241283849', 'info_dict': { @@ -30,9 +28,8 @@ class SeesoIE(InfoExtractor): } } - def _real_extract(self, url): + def _login(self): username, password = self._get_login_info() - video_id = self._match_id(url) if username is None or password is None: return @@ -48,26 +45,33 @@ class SeesoIE(InfoExtractor): # Send auth POST request and get token from response auth_request = sanitized_Request(_API_AUTH_URL, urlencode_postdata(auth_json)) - auth_response = json.loads(self._download_webpage(auth_request, '', note='Getting auth token...')) + auth_response = self._download_json(auth_request, '', note='Getting auth token...') auth_token = auth_response.get('user').get('token') + return auth_token + + def _real_extract(self, url): + video_id = self._match_id(url) + auth_token = self._login() + # Use the public unauthenticated API to get the video's info _VIDEO_INFO_URL = 'https://feed.theplatform.com/f/NZILfC/nbcott-prod-all-media?byAvailabilityState=' \ 'available&byId=%s&form=cjson' request = sanitized_Request(_VIDEO_INFO_URL % video_id) json_data = self._download_json(request, video_id) + entry = json_data.get('entries')[0] # Template fields - series = entry["nbc-chaos$show"] # Show name - title = entry["nbc-chaos$shortTitle"] # Episode Name - season_number = entry["nbc-chaos$seasonNumber"] - episode_number = entry["nbc-chaos$episodeNumber"] - thumbnail = entry["defaultThumbnailUrl"] - description = entry["nbc-chaos$shortDescription"] + series = entry.get("nbc-chaos$show") # Show name + title = entry.get("nbc-chaos$shortTitle") # Episode Name + season_number = entry.get("nbc-chaos$seasonNumber") + episode_number = entry.get("nbc-chaos$episodeNumber") + thumbnail = entry.get("defaultThumbnailUrl") + description = entry.get("nbc-chaos$shortDescription") # Got the show's public URL. Now we need to parse out the videoID - public_url_id = os.path.split(urlparse.urlparse(entry["publicUrl"]).path)[-1] + public_url_id = os.path.split(entry.get("publicUrl"))[-1] # Get the master m3u8 which lists formats m3u8_url = 'https://link.theplatform.com/s/NZILfC/media/{0}?feed=All%20Media%20Feed&auth={1}' \ @@ -87,5 +91,5 @@ class SeesoIE(InfoExtractor): 'episode_number': episode_number, 'description': description, 'url': '', - 'formats': formats + # 'formats': formats } From c8223f22fe4859b6ee8f22ea947261490bdd402d Mon Sep 17 00:00:00 2001 From: Dan Salmon Date: Mon, 19 Dec 2016 21:08:39 -0600 Subject: [PATCH 6/8] Re-enable because I'm dumb --- youtube_dl/extractor/seeso.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/seeso.py b/youtube_dl/extractor/seeso.py index 779b0ee64..d758d9075 100644 --- a/youtube_dl/extractor/seeso.py +++ b/youtube_dl/extractor/seeso.py @@ -91,5 +91,5 @@ class SeesoIE(InfoExtractor): 'episode_number': episode_number, 'description': description, 'url': '', - # 'formats': formats + 'formats': formats } From dd6a8301c83f3c9c3f92b04eb446f17237ad3e82 Mon Sep 17 00:00:00 2001 From: Dan Salmon Date: Tue, 20 Dec 2016 23:11:27 -0600 Subject: [PATCH 7/8] Break everything to make them happy --- youtube_dl/extractor/seeso.py | 93 ++++++++++++++++++++++++++--------- 1 file changed, 70 insertions(+), 23 deletions(-) diff --git a/youtube_dl/extractor/seeso.py b/youtube_dl/extractor/seeso.py index d758d9075..92aa8cf11 100644 --- a/youtube_dl/extractor/seeso.py +++ b/youtube_dl/extractor/seeso.py @@ -3,18 +3,51 @@ from __future__ import unicode_literals from .common import InfoExtractor import os.path +from .theplatform import ThePlatformFeedIE +# from .theplatform import ThePlatformBaseIE from ..utils import ( sanitized_Request, - urlencode_postdata + urlencode_postdata, + int_or_none ) -class SeesoIE(InfoExtractor): +class SeesoBaseIE(ThePlatformFeedIE): + def _extract_video_info(self, video_id, auth_token): + # print "extract_video_info - auth_token: ", auth_token + # _VIDEO_INFO_URL = 'https://feed.theplatform.com/f/NZILfC/nbcott-prod-all-media?byAvailabilityState=' \ + # 'available&byId=%s&form=cjson' + + # return self._extract_feed_info( + # 'NZILfC', 'nbcott-prod-all-media', ('byAvailabilityState=available&byId=%s' % video_id), lambda entry: { + # 'series': entry.get('nbc-chaos$show'), + # 'season_number': int_or_none(entry.get('nbc-chaos$seasonNumber')), + # 'episode': entry.get('nbc-chaos$shortTitle'), + # 'episode_number': int_or_none(entry.get('nbc-chaos$episodeNumber')), + # }, { + # 'StreamPack': { + # 'manifest': 'm3u', + # } + # }) + + return self._extract_feed_info( + 'NZILfC', 'nbcott-prod-all-media', 'byId=' + video_id, lambda entry: { + 'series': entry.get('nbc-chaos$show'), + 'season_number': int_or_none(entry.get('nbc-chaos$shortTitle')), + 'episode': entry.get('nbc-chaos$shortTitle'), + 'episode_number': int_or_none(entry.get('nbc-chaos$episodeNumber')), + }, { + 'Video': { + 'auth': auth_token, + } + }) + +class SeesoIE(SeesoBaseIE): _VALID_URL = r'https?://(?:www\.)?seeso\.com/view/episode/(?P[0-9]+)' - _TEST = { + _TESTS = [{ 'params': { - 'username': 'emailhere', - 'password': 'passhere' + 'username': '', + 'password': '' }, 'url': 'https://www.seeso.com/view/episode/799241283849', 'info_dict': { @@ -26,7 +59,7 @@ class SeesoIE(InfoExtractor): "and rival brokers Serge and Gio intimidate Glenn."), 'thumbnail': 'https://chaosic.akamaized.net/NBCOTT_-_Production/360/907/160831_3092487_Farsi_Lessons.jpg', } - } + }] def _login(self): username, password = self._get_login_info() @@ -54,34 +87,48 @@ class SeesoIE(InfoExtractor): video_id = self._match_id(url) auth_token = self._login() + return self._extract_video_info(video_id, auth_token) + # Use the public unauthenticated API to get the video's info - _VIDEO_INFO_URL = 'https://feed.theplatform.com/f/NZILfC/nbcott-prod-all-media?byAvailabilityState=' \ - 'available&byId=%s&form=cjson' - request = sanitized_Request(_VIDEO_INFO_URL % video_id) - json_data = self._download_json(request, video_id) + # _VIDEO_INFO_URL = 'https://feed.theplatform.com/f/NZILfC/nbcott-prod-all-media?byAvailabilityState=' \ + # 'available&byId=%s&form=cjson' + # request = sanitized_Request(_VIDEO_INFO_URL % video_id) + # json_data = self._download_json(request, video_id) + # tpf = ThePlatformFeedIE(ThePlatformBaseIE()) + # ThePlatformFeedIE._extract_feed_info(tpf, 'NZILfC', 'VxxJg8Ymh8sE', ('byId=' + video_id), video_id) - entry = json_data.get('entries')[0] - # Template fields - series = entry.get("nbc-chaos$show") # Show name - title = entry.get("nbc-chaos$shortTitle") # Episode Name - season_number = entry.get("nbc-chaos$seasonNumber") - episode_number = entry.get("nbc-chaos$episodeNumber") - thumbnail = entry.get("defaultThumbnailUrl") - description = entry.get("nbc-chaos$shortDescription") + # entry = json_data.get('entries')[0] - # Got the show's public URL. Now we need to parse out the videoID - public_url_id = os.path.split(entry.get("publicUrl"))[-1] + # # DEBUG + # entry = {} + # + # # Template fields + # title = entry.get("nbc-chaos$shortTitle") + # series = entry.get("nbc-chaos$show") + # season_number = entry.get("nbc-chaos$seasonNumber") + # episode_number = entry.get("nbc-chaos$episodeNumber") + # thumbnail = entry.get("defaultThumbnailUrl") + # description = entry.get("nbc-chaos$shortDescription") + # + # # Got the show's public URL. Now we need to parse out the videoID + # public_url_id = os.path.split(entry.get("publicUrl"))[-1] # Get the master m3u8 which lists formats - m3u8_url = 'https://link.theplatform.com/s/NZILfC/media/{0}?feed=All%20Media%20Feed&auth={1}' \ - '&vpaid=script,flash&formats=m3u,mpeg4'.format(public_url_id, auth_token) - formats = [] + # m3u8_url = 'https://link.theplatform.com/s/NZILfC/media/{0}?feed=All%20Media%20Feed&auth={1}' \ + # '&vpaid=script,flash&formats=m3u,mpeg4'.format(public_url_id, auth_token) + # formats = [] + + # pie = ThePlatformIE() + # # pie._real_extract(m3u8_url) + # formats = pie._real_extract(m3u8_url) + for entry in self._extract_m3u8_formats(m3u8_url, video_id, m3u8_id='m3u8', ext='mp4'): formats.append(entry) self._sort_formats(formats) + return { 'id': video_id, 'title': title, From 5904f050ca38e366c43d6e202a0259bae947221b Mon Sep 17 00:00:00 2001 From: Dan Salmon Date: Thu, 9 Mar 2017 20:40:12 +0100 Subject: [PATCH 8/8] Update extractor --- youtube_dl/extractor/seeso.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/youtube_dl/extractor/seeso.py b/youtube_dl/extractor/seeso.py index d758d9075..aa843c68b 100644 --- a/youtube_dl/extractor/seeso.py +++ b/youtube_dl/extractor/seeso.py @@ -10,21 +10,20 @@ from ..utils import ( class SeesoIE(InfoExtractor): - _VALID_URL = r'https?://(?:www\.)?seeso\.com/view/episode/(?P[0-9]+)' + _VALID_URL = r'https?://(?:www\.)?seeso\.com/view/(episode|movie)/(?P[0-9]+)' _TEST = { 'params': { - 'username': 'emailhere', - 'password': 'passhere' + 'username': 'emailaddress', + 'password': 'password' }, - 'url': 'https://www.seeso.com/view/episode/799241283849', + 'url': 'https://www.seeso.com/view/episode/697446467698', 'info_dict': { - 'id': '799241283849', + 'id': '697446467698', 'ext': 'mp4', - 'series': 'Bajillion Dollar Propertie$', - 'title': 'Farsi Lessons', - 'description': ("Amir leads Victoria into a trap, the Bros meet a super obnoxious bro, " - "and rival brokers Serge and Gio intimidate Glenn."), - 'thumbnail': 'https://chaosic.akamaized.net/NBCOTT_-_Production/360/907/160831_3092487_Farsi_Lessons.jpg', + 'series': 'Hidden America with Jonah Ray', + 'title': 'CHICAGO: THE SECOND BEST CITY', + 'description': "They call it the Second City and Jonah’s here to find out why. He digs into Chicago’s vast history of corruption as it relates to politics. It’s historical relevance to the Prohibition Era party scene. As well as taking in the city’s famous improv theaters, bars and nightlife.", + # 'thumbnail': 'https://chaosic.akamaized.net/NBCOTT_-_Production/360/907/160831_3092487_Farsi_Lessons.jpg', } } @@ -48,6 +47,7 @@ class SeesoIE(InfoExtractor): auth_response = self._download_json(auth_request, '', note='Getting auth token...') auth_token = auth_response.get('user').get('token') + print("auth_token: ", auth_token) return auth_token def _real_extract(self, url): @@ -77,7 +77,7 @@ class SeesoIE(InfoExtractor): m3u8_url = 'https://link.theplatform.com/s/NZILfC/media/{0}?feed=All%20Media%20Feed&auth={1}' \ '&vpaid=script,flash&formats=m3u,mpeg4'.format(public_url_id, auth_token) formats = [] - for entry in self._extract_m3u8_formats(m3u8_url, video_id, m3u8_id='m3u8', ext='mp4'): + for entry in self._extract_m3u8_formats(m3u8_url, video_id, m3u8_id='m3u8', ext='ts'): formats.append(entry) self._sort_formats(formats)