projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[neteasemusic] Changes after review
[youtube-dl]
/
youtube_dl
/
extractor
/
bet.py
diff --git
a/youtube_dl/extractor/bet.py
b/youtube_dl/extractor/bet.py
index d2abd4d772c95e9877a607af7cc0b6e4d56e123a..26b934543a7ac0d28cabf0ca70610460fc253a2f 100644
(file)
--- a/
youtube_dl/extractor/bet.py
+++ b/
youtube_dl/extractor/bet.py
@@
-16,11
+16,11
@@
class BetIE(InfoExtractor):
{
'url': 'http://www.bet.com/news/politics/2014/12/08/in-bet-exclusive-obama-talks-race-and-racism.html',
'info_dict': {
{
'url': 'http://www.bet.com/news/politics/2014/12/08/in-bet-exclusive-obama-talks-race-and-racism.html',
'info_dict': {
- 'id': '
740ab250-bb94-4a8a-8787-fe0de7c74471
',
+ 'id': '
news/national/2014/a-conversation-with-president-obama
',
'display_id': 'in-bet-exclusive-obama-talks-race-and-racism',
'ext': 'flv',
'display_id': 'in-bet-exclusive-obama-talks-race-and-racism',
'ext': 'flv',
- 'title': '
BET News Presents:
A Conversation With President Obama',
- 'description': 'md5:
5a88d8ae912c1b33e090290af7ec33c6
',
+ 'title': 'A Conversation With President Obama',
+ 'description': 'md5:
699d0652a350cf3e491cd15cc745b5da
',
'duration': 1534,
'timestamp': 1418075340,
'upload_date': '20141208',
'duration': 1534,
'timestamp': 1418075340,
'upload_date': '20141208',
@@
-35,7
+35,7
@@
class BetIE(InfoExtractor):
{
'url': 'http://www.bet.com/video/news/national/2014/justice-for-ferguson-a-community-reacts.html',
'info_dict': {
{
'url': 'http://www.bet.com/video/news/national/2014/justice-for-ferguson-a-community-reacts.html',
'info_dict': {
- 'id': '
bcd1b1df-673a-42cf-8d01-b282db608f2d
',
+ 'id': '
news/national/2014/justice-for-ferguson-a-community-reacts
',
'display_id': 'justice-for-ferguson-a-community-reacts',
'ext': 'flv',
'title': 'Justice for Ferguson: A Community Reacts',
'display_id': 'justice-for-ferguson-a-community-reacts',
'ext': 'flv',
'title': 'Justice for Ferguson: A Community Reacts',
@@
-61,6
+61,9
@@
class BetIE(InfoExtractor):
[r'mediaURL\s*:\s*"([^"]+)"', r"var\s+mrssMediaUrl\s*=\s*'([^']+)'"],
webpage, 'media URL'))
[r'mediaURL\s*:\s*"([^"]+)"', r"var\s+mrssMediaUrl\s*=\s*'([^']+)'"],
webpage, 'media URL'))
+ video_id = self._search_regex(
+ r'/video/(.*)/_jcr_content/', media_url, 'video id')
+
mrss = self._download_xml(media_url, display_id)
item = mrss.find('./channel/item')
mrss = self._download_xml(media_url, display_id)
item = mrss.find('./channel/item')
@@
-75,8
+78,6
@@
class BetIE(InfoExtractor):
description = xpath_text(
item, './description', 'description', fatal=False)
description = xpath_text(
item, './description', 'description', fatal=False)
- video_id = xpath_text(item, './guid', 'video id', fatal=False)
-
timestamp = parse_iso8601(xpath_text(
item, xpath_with_ns('./dc:date', NS_MAP),
'upload date', fatal=False))
timestamp = parse_iso8601(xpath_text(
item, xpath_with_ns('./dc:date', NS_MAP),
'upload date', fatal=False))