[slickpic] add user extractor (#249)
This commit is contained in:
@@ -95,7 +95,7 @@ Sen Manga https://raw.senmanga.com/ Chapters
|
||||
Sense-Scans http://sensescans.com/reader/ Chapters, Manga
|
||||
Sex.com https://www.sex.com/ Boards, Pins, Search Results
|
||||
Simply Hentai https://www.simply-hentai.com/ Galleries, individual Images, Videos
|
||||
SlickPic https://www.slickpic.com// Albums
|
||||
SlickPic https://www.slickpic.com/ Images from Users, Albums
|
||||
SlideShare https://www.slideshare.net/ Presentations
|
||||
SmugMug https://www.smugmug.com/ |smugmug-C| Optional (OAuth)
|
||||
The /b/ Archive https://thebarchive.com/ Threads
|
||||
|
||||
@@ -117,3 +117,24 @@ class SlickpicAlbumExtractor(SlickpicExtractor):
|
||||
"whq" : "1",
|
||||
}
|
||||
return self.request(url, method="POST", data=data).json()["list"]
|
||||
|
||||
|
||||
class SlickpicUserExtractor(SlickpicExtractor):
|
||||
subcategory = "user"
|
||||
pattern = BASE_PATTERN + r"(?:/gallery)?/?(?:$|[?#])"
|
||||
test = (
|
||||
("https://mattcrandall.slickpic.com/gallery/", {
|
||||
"count": ">= 358",
|
||||
"pattern": SlickpicAlbumExtractor.pattern,
|
||||
}),
|
||||
("https://mattcrandall.slickpic.com/"),
|
||||
)
|
||||
|
||||
def items(self):
|
||||
page = self.request(self.root + "/gallery?viewer").text
|
||||
data = {"_extractor": SlickpicAlbumExtractor}
|
||||
base = self.root + "/albums/"
|
||||
|
||||
yield Message.Version, 1
|
||||
for album in text.extract_iter(page, 'href="' + base, '"'):
|
||||
yield Message.Queue, base + album, data
|
||||
|
||||
Reference in New Issue
Block a user