Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Backups
youtube-dl
Commits
cc2ffe5a
Unverified
Commit
cc2ffe5a
authored
Jun 19, 2017
by
Yen Chi Hsuan
Browse files
[pandora.tv] Fix upload_date extraction (closes #12846)
parent
56005066
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
3 deletions
+28
-3
ChangeLog
ChangeLog
+6
-0
youtube_dl/extractor/pandoratv.py
youtube_dl/extractor/pandoratv.py
+22
-3
No files found.
ChangeLog
View file @
cc2ffe5a
version <unreleased>
Extractors
* [pandora.tv] Fix upload_date extraction (#12846)
version 2017.06.18
Core
...
...
youtube_dl/extractor/pandoratv.py
View file @
cc2ffe5a
...
...
@@ -19,7 +19,7 @@ class PandoraTVIE(InfoExtractor):
IE_NAME
=
'pandora.tv'
IE_DESC
=
'판도라TV'
_VALID_URL
=
r
'https?://(?:.+?\.)?channel\.pandora\.tv/channel/video\.ptv\?'
_TEST
=
{
_TEST
S
=
[
{
'url'
:
'http://jp.channel.pandora.tv/channel/video.ptv?c1=&prgid=53294230&ch_userid=mikakim&ref=main&lot=cate_01_2'
,
'info_dict'
:
{
'id'
:
'53294230'
,
...
...
@@ -34,7 +34,26 @@ class PandoraTVIE(InfoExtractor):
'view_count'
:
int
,
'like_count'
:
int
,
}
}
},
{
'url'
:
'http://channel.pandora.tv/channel/video.ptv?ch_userid=gogoucc&prgid=54721744'
,
'info_dict'
:
{
'id'
:
'54721744'
,
'ext'
:
'flv'
,
'title'
:
'[HD] JAPAN COUNTDOWN 170423'
,
'description'
:
'[HD] JAPAN COUNTDOWN 170423'
,
'thumbnail'
:
r
're:^https?://.*\.jpg$'
,
'duration'
:
1704.9
,
'upload_date'
:
'20170423'
,
'uploader'
:
'GOGO_UCC'
,
'uploader_id'
:
'gogoucc'
,
'view_count'
:
int
,
'like_count'
:
int
,
},
'params'
:
{
# Test metadata only
'skip_download'
:
True
,
},
}]
def
_real_extract
(
self
,
url
):
qs
=
compat_urlparse
.
parse_qs
(
compat_urlparse
.
urlparse
(
url
).
query
)
...
...
@@ -86,7 +105,7 @@ class PandoraTVIE(InfoExtractor):
'description'
:
info
.
get
(
'body'
),
'thumbnail'
:
info
.
get
(
'thumbnail'
)
or
info
.
get
(
'poster'
),
'duration'
:
float_or_none
(
info
.
get
(
'runtime'
),
1000
)
or
parse_duration
(
info
.
get
(
'time'
)),
'upload_date'
:
info
[
'fid'
][:
8
]
if
isinstance
(
info
.
get
(
'fid'
),
compat_str
)
else
None
,
'upload_date'
:
info
[
'fid'
]
.
split
(
'/'
)[
-
1
]
[:
8
]
if
isinstance
(
info
.
get
(
'fid'
),
compat_str
)
else
None
,
'uploader'
:
info
.
get
(
'nickname'
),
'uploader_id'
:
info
.
get
(
'upload_userid'
),
'view_count'
:
str_to_int
(
info
.
get
(
'hit'
)),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment