projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[youtube] Fix ytsearch* when cookies are provided
[youtube-dl]
/
youtube_dl
/
extractor
/
foxnews.py
diff --git
a/youtube_dl/extractor/foxnews.py
b/youtube_dl/extractor/foxnews.py
index 3e9a6a08c6de01774719dedc45d782c05adc1d4a..dc0662f74ce5a84d59aa94333ee14d56a592cda2 100644
(file)
--- a/
youtube_dl/extractor/foxnews.py
+++ b/
youtube_dl/extractor/foxnews.py
@@
-6,8
+6,8
@@
from .amp import AMPIE
from .common import InfoExtractor
from .common import InfoExtractor
-class FoxNews
Video
IE(AMPIE):
- IE_NAME = 'foxnews
:video
'
+class FoxNewsIE(AMPIE):
+ IE_NAME = 'foxnews'
IE_DESC = 'Fox News and Fox Business Video'
_VALID_URL = r'https?://(?P<host>video\.(?:insider\.)?fox(?:news|business)\.com)/v/(?:video-embed\.html\?video_id=)?(?P<id>\d+)'
_TESTS = [
IE_DESC = 'Fox News and Fox Business Video'
_VALID_URL = r'https?://(?P<host>video\.(?:insider\.)?fox(?:news|business)\.com)/v/(?:video-embed\.html\?video_id=)?(?P<id>\d+)'
_TESTS = [
@@
-22,7
+22,7
@@
class FoxNewsVideoIE(AMPIE):
'duration': 265,
'timestamp': 1304411491,
'upload_date': '20110503',
'duration': 265,
'timestamp': 1304411491,
'upload_date': '20110503',
- 'thumbnail': 're:^https?://.*\.jpg$',
+ 'thumbnail':
r
're:^https?://.*\.jpg$',
},
},
{
},
},
{
@@
-36,7
+36,7
@@
class FoxNewsVideoIE(AMPIE):
'duration': 292,
'timestamp': 1417662047,
'upload_date': '20141204',
'duration': 292,
'timestamp': 1417662047,
'upload_date': '20141204',
- 'thumbnail': 're:^https?://.*\.jpg$',
+ 'thumbnail':
r
're:^https?://.*\.jpg$',
},
'params': {
# m3u8 download
},
'params': {
# m3u8 download
@@
-67,9
+67,9
@@
class FoxNewsVideoIE(AMPIE):
return info
return info
-class FoxNewsIE(InfoExtractor):
+class FoxNews
Article
IE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?foxnews\.com/(?!v)([^/]+/)+(?P<id>[a-z-]+)'
_VALID_URL = r'https?://(?:www\.)?foxnews\.com/(?!v)([^/]+/)+(?P<id>[a-z-]+)'
- IE_NAME = 'foxnews'
+ IE_NAME = 'foxnews
:article
'
_TEST = {
'url': 'http://www.foxnews.com/politics/2016/09/08/buzz-about-bud-clinton-camp-denies-claims-wore-earpiece-at-forum.html',
_TEST = {
'url': 'http://www.foxnews.com/politics/2016/09/08/buzz-about-bud-clinton-camp-denies-claims-wore-earpiece-at-forum.html',
@@
-93,7
+93,7
@@
class FoxNewsIE(InfoExtractor):
webpage, 'video ID', group='id')
return self.url_result(
'http://video.foxnews.com/v/' + video_id,
webpage, 'video ID', group='id')
return self.url_result(
'http://video.foxnews.com/v/' + video_id,
- FoxNews
Video
IE.ie_key())
+ FoxNewsIE.ie_key())
class FoxNewsInsiderIE(InfoExtractor):
class FoxNewsInsiderIE(InfoExtractor):
@@
-111,13
+111,13
@@
class FoxNewsInsiderIE(InfoExtractor):
'description': 'Is campus censorship getting out of control?',
'timestamp': 1472168725,
'upload_date': '20160825',
'description': 'Is campus censorship getting out of control?',
'timestamp': 1472168725,
'upload_date': '20160825',
- 'thumbnail': 're:^https?://.*\.jpg$',
+ 'thumbnail':
r
're:^https?://.*\.jpg$',
},
'params': {
# m3u8 download
'skip_download': True,
},
},
'params': {
# m3u8 download
'skip_download': True,
},
- 'add_ie': [FoxNews
Video
IE.ie_key()],
+ 'add_ie': [FoxNewsIE.ie_key()],
}
def _real_extract(self, url):
}
def _real_extract(self, url):
@@
-132,7
+132,7
@@
class FoxNewsInsiderIE(InfoExtractor):
return {
'_type': 'url_transparent',
return {
'_type': 'url_transparent',
- 'ie_key': FoxNews
Video
IE.ie_key(),
+ 'ie_key': FoxNewsIE.ie_key(),
'url': embed_url,
'display_id': display_id,
'title': title,
'url': embed_url,
'display_id': display_id,
'title': title,