From c45f410b3a014a541281e750f195e1da66611fdc Mon Sep 17 00:00:00 2001 From: biwubo Date: Sun, 24 Mar 2019 13:32:05 +0000 Subject: [PATCH] [tunein] Fix generic tunein test and simplify regex --- youtube_dl/extractor/generic.py | 4 ++-- youtube_dl/extractor/tunein.py | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/youtube_dl/extractor/generic.py b/youtube_dl/extractor/generic.py index 6f48b04da..f58f0241a 100644 --- a/youtube_dl/extractor/generic.py +++ b/youtube_dl/extractor/generic.py @@ -1020,8 +1020,8 @@ class GenericIE(InfoExtractor): 'info_dict': { 'id': '204146', 'ext': 'mp3', - 'title': 'CNRV', - 'location': 'Paris, France', + 'title': 're:CNRV', + 'description': 'md5:298ece12650f386bebdf3c3499a4f846', 'is_live': True, }, 'params': { diff --git a/youtube_dl/extractor/tunein.py b/youtube_dl/extractor/tunein.py index 41b0d3fab..4573eed40 100644 --- a/youtube_dl/extractor/tunein.py +++ b/youtube_dl/extractor/tunein.py @@ -95,7 +95,7 @@ class TuneInStationIE(TuneInBaseIE): 'url': 'http://tunein.com/radio/Jazz24-885-s34682/', 'info_dict': { 'id': '34682', - 'title': 're:.*Jazz24.*', + 'title': 're:Jazz24', 'description': 'md5:c94dad268809130da5c91b0760f366a1', 'ext': 'mp3' }, @@ -156,8 +156,9 @@ class TuneInProgramIE(TuneInBaseIE): for entry in self._process_page(page): yield entry - has_more = try_get(page, - lambda p: p['Paging']['Next'], compat_str) is not None + has_more = try_get( + page, + lambda p: p['Paging']['Next'], compat_str) is not None if has_more: offset += page['Paging']['ItemCount'] @@ -201,7 +202,7 @@ class TuneInShortenerIE(InfoExtractor): 'url': 'http://tun.in/ser7s', 'info_dict': { 'id': '34682', - 'title': 're:.*Jazz24.*', + 'title': 're:Jazz24', 'description': 'md5:c94dad268809130da5c91b0760f366a1', 'ext': 'mp3' },