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:
gengenson-code
2025-11-09 11:57:12 +01:00
committed by GitHub
parent aba68f8643
commit a9018d1911
4 changed files with 24 additions and 1 deletions

View File

@@ -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">

View File

@@ -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"

View File

@@ -387,6 +387,7 @@ SUBCATEGORY_MAP = {
},
"sexcom": {
"pins": "User Pins",
"feed": "Feed",
},
"sizebooru": {
"user": "User Uploads",

View File

@@ -250,4 +250,9 @@ __tests__ = (
"url" : str,
},
{
"#url" : "https://www.sex.com/feed/",
"#class": sexcom.SexcomFeedExtractor,
},
)