replace 'text.extract()' with 'text.extr()' where possible

This commit is contained in:
Mike Fährmann
2022-11-04 23:39:38 +01:00
parent eb33e6cf2d
commit b0cb4a1b9c
79 changed files with 199 additions and 202 deletions

View File

@@ -55,8 +55,8 @@ class EromeExtractor(Extractor):
yield Message.Directory, data
groups = page.split('<div class="media-group"')
for data["num"], group in enumerate(util.advance(groups, 1), 1):
url = (text.extract(group, '<source src="', '"')[0] or
text.extract(group, 'data-src="', '"')[0])
url = (text.extr(group, '<source src="', '"') or
text.extr(group, 'data-src="', '"'))
if url:
yield Message.Url, url, text.nameext_from_url(url, data)