[listal] add 'image' & 'people' extractors (#1589 #8921)

* listal extractor
* add listal to init
* fix flake8 & formatting & extractor names/subcategories

* remove 're' import
* remove 'datetime' import
* update & simplify extractors
* update supportedsites
* add tests

---------

Co-authored-by: Mike Fährmann <mike_faehrmann@web.de>
This commit is contained in:
SubmarineScurvy
2026-01-27 10:26:41 -07:00
committed by GitHub
parent eaaa25b6e4
commit ef8f2869e7
5 changed files with 140 additions and 0 deletions

47
test/results/listal.py Normal file
View File

@@ -0,0 +1,47 @@
# -*- coding: utf-8 -*-
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
from gallery_dl.extractor import listal
__tests__ = (
{
"#url" : "https://www.listal.com/viewimage/29620846",
"#class" : listal.ListalImageExtractor,
"#results" : "https://ilarge.lisimg.com/image/29620846/1030full-jim-carrey.jpg",
"author" : "sinaia16",
"author_url": "https://sinaia16.listal.com",
"date" : "dt:2024-07-18 18:50:00",
"extension" : "jpg",
"filename" : "1030full-jim-carrey",
"height" : 1037,
"id" : "29620846",
"title" : "Jim Carrey",
"url" : "https://ilarge.lisimg.com/image/29620846/1030full-jim-carrey.jpg",
"width" : 1030,
},
{
"#url" : "https://www.listal.com/jim-carrey/pictures",
"#class" : listal.ListalPeopleExtractor,
"#pattern" : r"https://i\w+\.lisimg\.com/image/\d+/\d+full-.+\.jpg",
"#range" : "1-10",
"#count" : 10,
"author" : str,
"author_url": r"re:https://\w+.listal.com",
"date" : "type:datetime",
"extension" : "jpg",
"filename" : str,
"width" : range(200, 2000),
"height" : range(200, 2000),
"id" : r"re:\d+",
"title" : "Jim Carrey",
"url" : r"re:https://.+",
},
)