[sexcom] add 'pins' extractor (closes #2265)
This commit is contained in:
@@ -676,7 +676,7 @@ Consider all sites to be NSFW unless otherwise known.
|
|||||||
<tr>
|
<tr>
|
||||||
<td>Sex.com</td>
|
<td>Sex.com</td>
|
||||||
<td>https://www.sex.com/</td>
|
<td>https://www.sex.com/</td>
|
||||||
<td>Boards, Pins, related Pins, Search Results</td>
|
<td>Boards, Pins, User Pins, related Pins, Search Results</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright 2019-2020 Mike Fährmann
|
# Copyright 2019-2022 Mike Fährmann
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License version 2 as
|
||||||
@@ -167,6 +167,27 @@ class SexcomRelatedPinExtractor(SexcomPinExtractor):
|
|||||||
return self._pagination(url)
|
return self._pagination(url)
|
||||||
|
|
||||||
|
|
||||||
|
class SexcomPinsExtractor(SexcomExtractor):
|
||||||
|
"""Extractor for a user's pins on www.sex.com"""
|
||||||
|
subcategory = "pins"
|
||||||
|
directory_fmt = ("{category}", "{user}")
|
||||||
|
pattern = r"(?:https?://)?(?:www\.)?sex\.com/user/([^/?#]+)/pins/"
|
||||||
|
test = ("https://www.sex.com/user/sirjuan79/pins/", {
|
||||||
|
"count": ">= 15",
|
||||||
|
})
|
||||||
|
|
||||||
|
def __init__(self, match):
|
||||||
|
SexcomExtractor.__init__(self, match)
|
||||||
|
self.user = match.group(1)
|
||||||
|
|
||||||
|
def metadata(self):
|
||||||
|
return {"user": text.unquote(self.user)}
|
||||||
|
|
||||||
|
def pins(self):
|
||||||
|
url = "{}/user/{}/pins/".format(self.root, self.user)
|
||||||
|
return self._pagination(url)
|
||||||
|
|
||||||
|
|
||||||
class SexcomBoardExtractor(SexcomExtractor):
|
class SexcomBoardExtractor(SexcomExtractor):
|
||||||
"""Extractor for pins from a board on www.sex.com"""
|
"""Extractor for pins from a board on www.sex.com"""
|
||||||
subcategory = "board"
|
subcategory = "board"
|
||||||
|
|||||||
@@ -182,6 +182,9 @@ SUBCATEGORY_MAP = {
|
|||||||
"sankaku": {
|
"sankaku": {
|
||||||
"books": "Book Searches",
|
"books": "Book Searches",
|
||||||
},
|
},
|
||||||
|
"sexcom": {
|
||||||
|
"pins": "User Pins",
|
||||||
|
},
|
||||||
"smugmug": {
|
"smugmug": {
|
||||||
"path": "Images from Users and Folders",
|
"path": "Images from Users and Folders",
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user