diff options
| author | 2022-11-22 04:28:38 -0500 | |
|---|---|---|
| committer | 2022-11-22 04:28:38 -0500 | |
| commit | 7af5cc29d1c02d20a6890b7b7ba78ab41532a763 (patch) | |
| tree | 4f0366e5653074c7eb31ac7ca59a1ee55f2d736e /gallery_dl/extractor/nijie.py | |
| parent | e59d46ecda74190381b1d2725b0bd9df5c0be8d8 (diff) | |
New upstream version 1.24.0.upstream/1.24.0
Diffstat (limited to 'gallery_dl/extractor/nijie.py')
| -rw-r--r-- | gallery_dl/extractor/nijie.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gallery_dl/extractor/nijie.py b/gallery_dl/extractor/nijie.py index 73911b2..079bae7 100644 --- a/gallery_dl/extractor/nijie.py +++ b/gallery_dl/extractor/nijie.py @@ -107,7 +107,7 @@ class NijieExtractor(AsynchronousMixin, BaseExtractor): """Extract image URLs from 'page'""" images = text.extract_iter(page, "/view_popup.php", "</a>") for num, image in enumerate(images): - src = text.extract(image, 'src="', '"')[0] + src = text.extr(image, 'src="', '"') if not src: continue url = ("https:" + src).replace("/__rs_l120x120/", "/") @@ -118,7 +118,7 @@ class NijieExtractor(AsynchronousMixin, BaseExtractor): @staticmethod def _extract_user_name(page): - return text.unescape(text.extract(page, "<br />", "<")[0] or "") + return text.unescape(text.extr(page, "<br />", "<")) def login(self): """Login and obtain session cookies""" @@ -322,8 +322,7 @@ class NijieNuitaExtractor(NijieExtractor): @staticmethod def _extract_user_name(page): - return text.unescape(text.extract( - page, "<title>", "さんの抜いた")[0] or "") + return text.unescape(text.extr(page, "<title>", "さんの抜いた")) class NijieFeedExtractor(NijieExtractor): |
