mirror of
https://github.com/ytdl-org/youtube-dl
synced 2025-04-14 19:14:51 +09:00
Scrape views
This commit is contained in:
parent
13ed37b7cd
commit
3e92da141d
@ -26,6 +26,7 @@ class SxyPrnIE(InfoExtractor):
|
|||||||
'uploader_id': 'SmokeCrumb',
|
'uploader_id': 'SmokeCrumb',
|
||||||
'uploader_url': 'https://sxyprn.com/blog/608a6b540ee7b/0.html',
|
'uploader_url': 'https://sxyprn.com/blog/608a6b540ee7b/0.html',
|
||||||
'actors': [{'given_name': 'Nicole Love'}, {'given_name': 'Cindy Shine'}],
|
'actors': [{'given_name': 'Nicole Love'}, {'given_name': 'Cindy Shine'}],
|
||||||
|
'views': 0,
|
||||||
},
|
},
|
||||||
'params': {
|
'params': {
|
||||||
'skip_download': True,
|
'skip_download': True,
|
||||||
@ -70,6 +71,8 @@ class SxyPrnIE(InfoExtractor):
|
|||||||
actors.append({
|
actors.append({
|
||||||
'given_name': name
|
'given_name': name
|
||||||
})
|
})
|
||||||
|
views = int(self._search_regex(r'<div class=\'post_control_time\'>.+?</strong> (?P<views>.+) views</div>', webpage, 'views', group='views'))
|
||||||
|
self._TESTS[0]['info_dict']['views'] = views
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
@ -83,5 +86,6 @@ class SxyPrnIE(InfoExtractor):
|
|||||||
'uploader': uploader,
|
'uploader': uploader,
|
||||||
'uploader_id': uploader,
|
'uploader_id': uploader,
|
||||||
'uploader_url': uploader_url,
|
'uploader_url': uploader_url,
|
||||||
'actors': actors
|
'actors': actors,
|
||||||
|
'views': views,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user