1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-29 21:52:54 +00:00

Add default fallback values for creator_data

This commit is contained in:
DarkFighterLuke 2022-02-26 15:51:58 +01:00
parent 2606c3108e
commit 3aba2a7912

View file

@ -149,8 +149,11 @@ class XVideosIE(InfoExtractor):
tags = self._search_regex(r'<meta name="keywords" content="xvideos,xvideos\.com, x videos,x video,porn,video,videos,(?P<tag>.+?)"', webpage, 'tags', group='tag', default='').split(',')
creator_data = re.findall(r'<a href="(?P<creator_url>.+?)" class="btn btn-default label main uploader-tag hover-name"><span class="name">(?P<creator>.+?)<', webpage)
creator = creator_data[0][1]
uploader_url = creator_data[0][0]
creator = ''
uploader_url = ''
if creator_data is not None:
creator = creator_data[0][1]
uploader_url = creator_data[0][0]
actors_data = re.findall(r'href="(?P<actor_url>/pornstars/.+?)" class="btn btn-default label profile hover-name"><span class="name">(?P<actor_name>.+?)</span>', webpage)
actors = []