Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
Added exception handling to additionalChannels
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Beek committed May 10, 2018
1 parent 9b5a1b0 commit 11114c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nederland24.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,11 @@ def additionalChannels(url, depth):
url = tag.find('media:content')['url']
img = os.path.join(IMG_DIR, "npo_placeholder.png")
addLink(title, url, "playVideo", img, '')
finally:
i += 1
if i == int(depth):
break
except (AttributeError): # Prevent error when there are no additional channels available
break


def playVideo(url):
Expand Down

0 comments on commit 11114c2

Please sign in to comment.