aboutsummaryrefslogtreecommitdiffstats
path: root/hypervideo_dl/extractor/senategov.py
diff options
context:
space:
mode:
Diffstat (limited to 'hypervideo_dl/extractor/senategov.py')
-rw-r--r--hypervideo_dl/extractor/senategov.py15
1 files changed, 1 insertions, 14 deletions
diff --git a/hypervideo_dl/extractor/senategov.py b/hypervideo_dl/extractor/senategov.py
index b295184..7ff0cf5 100644
--- a/hypervideo_dl/extractor/senategov.py
+++ b/hypervideo_dl/extractor/senategov.py
@@ -1,6 +1,3 @@
-# coding: utf-8
-from __future__ import unicode_literals
-
import re
from .common import InfoExtractor
@@ -52,6 +49,7 @@ _COMMITTEES = {
class SenateISVPIE(InfoExtractor):
_IE_NAME = 'senate.gov:isvp'
_VALID_URL = r'https?://(?:www\.)?senate\.gov/isvp/?\?(?P<qs>.+)'
+ _EMBED_REGEX = [r"<iframe[^>]+src=['\"](?P<url>https?://www\.senate\.gov/isvp/?\?[^'\"]+)['\"]"]
_TESTS = [{
'url': 'http://www.senate.gov/isvp/?comm=judiciary&type=live&stt=&filename=judiciary031715&auto_play=false&wmode=transparent&poster=http%3A%2F%2Fwww.judiciary.senate.gov%2Fthemes%2Fjudiciary%2Fimages%2Fvideo-poster-flash-fit.png',
@@ -90,14 +88,6 @@ class SenateISVPIE(InfoExtractor):
'only_matching': True,
}]
- @staticmethod
- def _search_iframe_url(webpage):
- mobj = re.search(
- r"<iframe[^>]+src=['\"](?P<url>https?://www\.senate\.gov/isvp/?\?[^'\"]+)['\"]",
- webpage)
- if mobj:
- return mobj.group('url')
-
def _real_extract(self, url):
url, smuggled_data = unsmuggle_url(url, {})
@@ -141,8 +131,6 @@ class SenateISVPIE(InfoExtractor):
entry['format_id'] += mobj.group('tag')
formats.append(entry)
- self._sort_formats(formats)
-
return {
'id': video_id,
'title': title,
@@ -197,7 +185,6 @@ class SenateGovIE(InfoExtractor):
formats = self._extract_m3u8_formats(
f'{stream_domain}/i/{filename}_1@{stream_num}/master.m3u8',
display_id, ext='mp4')
- self._sort_formats(formats)
title = self._html_search_regex(
(*self._og_regexes('title'), r'(?s)<title>([^<]*?)</title>'), webpage, 'video title')