mirror of
https://github.com/ytdl-org/youtube-dl
synced 2025-01-30 23:30:10 +09:00
Fix checks on empty data
This commit is contained in:
parent
9823824d7c
commit
4d93d7072d
@ -6,6 +6,7 @@ import re
|
|||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
determine_ext,
|
determine_ext,
|
||||||
|
float_or_none,
|
||||||
int_or_none,
|
int_or_none,
|
||||||
NO_DEFAULT,
|
NO_DEFAULT,
|
||||||
str_to_int,
|
str_to_int,
|
||||||
@ -100,13 +101,13 @@ class XNXXIE(InfoExtractor):
|
|||||||
uploader_data = re.findall(r'<a class=".+?-plate" href="(?P<uploader_url>.+?)">(?P<uploader_name>.+?)</a>', webpage)
|
uploader_data = re.findall(r'<a class=".+?-plate" href="(?P<uploader_url>.+?)">(?P<uploader_name>.+?)</a>', webpage)
|
||||||
uploader_id = ''
|
uploader_id = ''
|
||||||
uploader_url = ''
|
uploader_url = ''
|
||||||
if uploader_data is not None:
|
if uploader_data!=[]:
|
||||||
uploader_id = uploader_data[0][1]
|
uploader_id = uploader_data[0][1]
|
||||||
uploader_url = uploader_data[0][0]
|
uploader_url = uploader_data[0][0]
|
||||||
|
|
||||||
actors_data = re.findall(r'<a class="is-pornstar" href="(?P<actor_url>.+?)">(?P<actor_name>.+?)</a>', webpage)
|
actors_data = re.findall(r'<a class="is-pornstar" href="(?P<actor_url>.+?)">(?P<actor_name>.+?)</a>', webpage)
|
||||||
actors = []
|
actors = []
|
||||||
if actors_data is not None:
|
if actors_data != []:
|
||||||
for actor_tuple in actors_data:
|
for actor_tuple in actors_data:
|
||||||
actors.append({
|
actors.append({
|
||||||
'given_name': actor_tuple[1],
|
'given_name': actor_tuple[1],
|
||||||
|
Loading…
Reference in New Issue
Block a user