Added support for sex.com's feed (cookie required) (#8519)
* Added Extractor for sex.com feed * Removed old comment * add test URL * update supportedsites * simplify & fix flake8 newlines * warn about missing session cookie --------- Co-authored-by: Mike Fährmann <mike_faehrmann@web.de>
This commit is contained in:
@@ -928,7 +928,7 @@ Consider all listed sites to potentially be NSFW.
|
||||
<tr id="sexcom" title="sexcom">
|
||||
<td>Sex.com</td>
|
||||
<td>https://www.sex.com/</td>
|
||||
<td>Boards, Likes, Pins, User Pins, related Pins, Search Results</td>
|
||||
<td>Boards, Feed, Likes, Pins, User Pins, related Pins, Search Results</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr id="simpcity" title="simpcity">
|
||||
|
||||
@@ -269,6 +269,23 @@ class SexcomBoardExtractor(SexcomExtractor):
|
||||
return self._pagination(url)
|
||||
|
||||
|
||||
class SexcomFeedExtractor(SexcomExtractor):
|
||||
"""Extractor for pins from your account's main feed on www.sex.com"""
|
||||
subcategory = "feed"
|
||||
directory_fmt = ("{category}", "feed")
|
||||
pattern = rf"{BASE_PATTERN}/feed"
|
||||
example = "https://www.sex.com/feed/"
|
||||
|
||||
def metadata(self):
|
||||
return {"feed": True}
|
||||
|
||||
def pins(self):
|
||||
if not self.cookies_check(("sess_sex",)):
|
||||
self.log.warning("no 'sess_sex' cookie set")
|
||||
url = f"{self.root}/feed/"
|
||||
return self._pagination(url)
|
||||
|
||||
|
||||
class SexcomSearchExtractor(SexcomExtractor):
|
||||
"""Extractor for search results on www.sex.com"""
|
||||
subcategory = "search"
|
||||
|
||||
@@ -387,6 +387,7 @@ SUBCATEGORY_MAP = {
|
||||
},
|
||||
"sexcom": {
|
||||
"pins": "User Pins",
|
||||
"feed": "Feed",
|
||||
},
|
||||
"sizebooru": {
|
||||
"user": "User Uploads",
|
||||
|
||||
@@ -250,4 +250,9 @@ __tests__ = (
|
||||
"url" : str,
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://www.sex.com/feed/",
|
||||
"#class": sexcom.SexcomFeedExtractor,
|
||||
},
|
||||
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user