From 563034f100bb5527a25b5b45ba900c81a9963ee9 Mon Sep 17 00:00:00 2001 From: Julian Galperin Date: Thu, 18 Apr 2019 17:42:34 -0400 Subject: [PATCH] Added except on Regex error --- youtube_dl/extractor/changba.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/changba.py b/youtube_dl/extractor/changba.py index 7b2b782f3..3e0098f73 100644 --- a/youtube_dl/extractor/changba.py +++ b/youtube_dl/extractor/changba.py @@ -2,7 +2,10 @@ from __future__ import unicode_literals from .common import InfoExtractor -from ..utils import int_or_none +from ..utils import ( + int_or_none, + RegexNotFoundError, +) class ChangbaIE(InfoExtractor): @@ -46,7 +49,7 @@ class ChangbaIE(InfoExtractor): try: src_url = self._search_regex(r'var a="([^"]*)', webpage, 'url') - except: + except RegexNotFoundError: src_url = 'http://lzscuw.changba.com/' + str(id) + '.' + ext return {