mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-19 20:10:25 +00:00
[pornovoisines] Improve average_rating extraction and update test case
This commit is contained in:
parent
c33c547d66
commit
54eb81a087
@ -34,7 +34,7 @@ class PornoVoisinesIE(InfoExtractor):
|
|||||||
'duration': 120,
|
'duration': 120,
|
||||||
'view_count': int,
|
'view_count': int,
|
||||||
'average_rating': float,
|
'average_rating': float,
|
||||||
'categories': ['Débutante', 'Scénario', 'Sodomie'],
|
'categories': ['Débutantes', 'Scénario', 'Sodomie'],
|
||||||
'age_limit': 18,
|
'age_limit': 18,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -71,7 +71,7 @@ class PornoVoisinesIE(InfoExtractor):
|
|||||||
view_count = int_or_none(self._search_regex(
|
view_count = int_or_none(self._search_regex(
|
||||||
r'(\d+) vues', webpage, 'view count', fatal=False))
|
r'(\d+) vues', webpage, 'view count', fatal=False))
|
||||||
average_rating = self._search_regex(
|
average_rating = self._search_regex(
|
||||||
r'Note : (\d+,\d+)', webpage, 'average rating', fatal=False)
|
r'Note\s*:\s*(\d+(?:,\d+)?)', webpage, 'average rating', fatal=False)
|
||||||
if average_rating:
|
if average_rating:
|
||||||
average_rating = float_or_none(average_rating.replace(',', '.'))
|
average_rating = float_or_none(average_rating.replace(',', '.'))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user