mirror of
https://source.perfectable.org/nivertius/napi.git
synced 2025-07-02 03:04:39 +02:00
accepting no valid xml in response as missing subtitles
This commit is contained in:
parent
2de212873d
commit
71b4e37d2d
1 changed files with 3 additions and 1 deletions
4
napi
4
napi
|
@ -55,7 +55,9 @@ for movie_filename in args:
|
|||
response = urllib.urlopen(base_url, request_data)
|
||||
response_data = response.read()
|
||||
response_xml = XML(response_data)
|
||||
if response_xml.find('status').text != 'success':
|
||||
|
||||
response_status = response_xml.find('status')
|
||||
if response_status is None or response_status.text != 'success':
|
||||
print "%s: No subtitles found" % (movie_filename,)
|
||||
continue
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue