mirror of
https://github.com/ytdl-org/youtube-dl
synced 2025-01-06 03:20:10 +09:00
Scrape views
This commit is contained in:
parent
16a2888b1a
commit
a4ca768169
@ -10,6 +10,7 @@ from ..utils import (
|
|||||||
ExtractorError,
|
ExtractorError,
|
||||||
int_or_none,
|
int_or_none,
|
||||||
parse_duration,
|
parse_duration,
|
||||||
|
str_to_int,
|
||||||
urljoin,
|
urljoin,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -37,6 +38,7 @@ class XVideosIE(InfoExtractor):
|
|||||||
'tags': ['lesbian', 'teen', 'hardcore', 'latina', 'rough', 'squirt', 'big-ass', 'cheater', 'twistys', 'cheat', 'ass-play', 'when-girls-play'],
|
'tags': ['lesbian', 'teen', 'hardcore', 'latina', 'rough', 'squirt', 'big-ass', 'cheater', 'twistys', 'cheat', 'ass-play', 'when-girls-play'],
|
||||||
'creator': 'Twistys',
|
'creator': 'Twistys',
|
||||||
'actors': [{'given_name': 'Adriana Chechik', 'url': 'https://www.xvideos.com/pornstars/adriana-chechik'}, {'given_name': 'Abella Danger', 'url': 'https://www.xvideos.com/pornstars/abella-danger'}],
|
'actors': [{'given_name': 'Adriana Chechik', 'url': 'https://www.xvideos.com/pornstars/adriana-chechik'}, {'given_name': 'Abella Danger', 'url': 'https://www.xvideos.com/pornstars/abella-danger'}],
|
||||||
|
'views': int,
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
'url': 'https://flashservice.xvideos.com/embedframe/4588838',
|
'url': 'https://flashservice.xvideos.com/embedframe/4588838',
|
||||||
@ -153,6 +155,8 @@ class XVideosIE(InfoExtractor):
|
|||||||
'url': urljoin(url, actor_tuple[0]),
|
'url': urljoin(url, actor_tuple[0]),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
views = self._search_regex(r'<strong class="mobile-hide">(?P<views>.+?)<', webpage, 'views', group='views')
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
@ -163,4 +167,5 @@ class XVideosIE(InfoExtractor):
|
|||||||
'tags': tags,
|
'tags': tags,
|
||||||
'creator': creator,
|
'creator': creator,
|
||||||
'actors': actors,
|
'actors': actors,
|
||||||
|
'views': str_to_int(views),
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user