Nine downloads fail to find "renditions"

Issue #11 duplicate
Jeremy Laidman created an issue

Unable to download from Nine, not sure for how long. Crashes out on the first attempt, causing subsequent shows to not be attempted even.

The code in brightcove.py function download() assumes that the JSON includes a "renditions:" key, but testing several different shows from Nine shows that there is no such key. In fact the JSON has no URLs containing ampersand (&) and so the next bit of code (that splits on the ampersand into vbase and vpath) has nothing to go on.

Example:

Choose> 1
  1) 2 Broke Girls - 4x01 - And The Reality Problem
  2) 2 Broke Girls - 4x02 - And The DJ Face
  3) 2 Broke Girls - 4x03 - And The Childhood Not Included
  4) 2 Broke Girls - 4x04 - And the Old Bike Yarn
  0) Back
Choose> 1
video desc_url http://api.brightcove.com/services/library?token=ogxhPgSphIVa2hhxbi9oqtYwtg032io4B4-ImwddYliFWHqS0UfMEw..&video_id=3871660413001&command=find_video_by_id&video_fields=renditions
Traceback (most recent call last):
  File "/home/jpl/webdl/src/grabber.py", line 58, in <module>
    main()
  File "/home/jpl/webdl/src/grabber.py", line 51, in main
    if not n.download():
  File "/home/jpl/webdl/src/brightcove.py", line 40, in download
    raise Exception("Could not find video URL for '%s': %s" % (self.title, desc_url) )
Exception: Could not find video URL for '2 Broke Girls - 4x01 - And The Reality Problem': http://api.brightcove.com/services/library?token=ogxhPgSphIVa2hhxbi9oqtYwtg032io4B4-ImwddYliFWHqS0UfMEw..&video_id=3871660413001&command=find_video_by_id&video_fields=renditions

Comments (1)

  1. Log in to comment