[generic] prevent reference before assignment errors
This commit is contained in:
parent
57182dca50
commit
4f8ed0968b
@ -2009,6 +2009,7 @@ class GenericIE(InfoExtractor):
|
|||||||
|
|
||||||
entries = []
|
entries = []
|
||||||
for it in doc.findall('./channel/item'):
|
for it in doc.findall('./channel/item'):
|
||||||
|
next_url = None
|
||||||
enclosure_nodes = it.findall('./enclosure')
|
enclosure_nodes = it.findall('./enclosure')
|
||||||
for e in enclosure_nodes:
|
for e in enclosure_nodes:
|
||||||
next_url = e.attrib.get('url')
|
next_url = e.attrib.get('url')
|
||||||
@ -2018,7 +2019,7 @@ class GenericIE(InfoExtractor):
|
|||||||
if not enclosure_nodes:
|
if not enclosure_nodes:
|
||||||
next_url = xpath_text(it, 'link', fatal=False)
|
next_url = xpath_text(it, 'link', fatal=False)
|
||||||
|
|
||||||
if not next_url:
|
if next_url is None:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
entries.append({
|
entries.append({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user