From 99d03e25442b7fd6965c9fef3f112120292d61d5 Mon Sep 17 00:00:00 2001 From: Barbara Miller Date: Tue, 23 Jun 2020 13:13:58 -0700 Subject: [PATCH] try / except --- brozzler/ydl.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/brozzler/ydl.py b/brozzler/ydl.py index f6f2ee6..caa6f8f 100644 --- a/brozzler/ydl.py +++ b/brozzler/ydl.py @@ -160,7 +160,13 @@ def _build_youtube_dl(worker, destdir, site): # videos. We unroll that iterator here partly because # otherwise `process_ie_result()` will clobber it, and we # use it later to extract the watch pages as outlinks. - ie_result['entries_no_dl'] = list(ie_result['entries']) + try: + ie_result['entries_no_dl'] = list(ie_result['entries']) + except Exception as e: + self.logger.warning( + "failed to unroll ie_result['entries']? for %s, %s; exception {}", + ie.IE_NAME, url, e) + ie_result['entries_no_dl'] =[] ie_result['entries'] = [] self.logger.info( 'not downloading %s media files from this '