[subscribestar] merge 'user-tag' into regular 'user' extractor (#8737)
This commit is contained in:
@@ -1042,7 +1042,7 @@ Consider all listed sites to potentially be NSFW.
|
|||||||
<tr id="subscribestar" title="subscribestar">
|
<tr id="subscribestar" title="subscribestar">
|
||||||
<td>SubscribeStar</td>
|
<td>SubscribeStar</td>
|
||||||
<td>https://www.subscribestar.com/</td>
|
<td>https://www.subscribestar.com/</td>
|
||||||
<td>Posts, User Profiles, User Tags</td>
|
<td>Posts, User Profiles</td>
|
||||||
<td>Supported</td>
|
<td>Supported</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="sxypix" title="sxypix">
|
<tr id="sxypix" title="sxypix">
|
||||||
|
|||||||
@@ -233,28 +233,24 @@ class SubscribestarExtractor(Extractor):
|
|||||||
self._warn_preview = util.noop
|
self._warn_preview = util.noop
|
||||||
|
|
||||||
|
|
||||||
class SubscribestarUserTagExtractor(SubscribestarExtractor):
|
|
||||||
"""Extractor for a subscribestar user's tagged posts"""
|
|
||||||
subcategory = "user-tag"
|
|
||||||
pattern = BASE_PATTERN + r"/(?!posts/)([^/?#]+)\?tag=([^#]+)"
|
|
||||||
example = "https://www.subscribestar.com/USER?tag=TAG"
|
|
||||||
|
|
||||||
def posts(self):
|
|
||||||
_, user, tag = self.groups
|
|
||||||
self.kwdict["search_tags"] = tag = text.unquote(tag)
|
|
||||||
url = f"{self.root}/{user}"
|
|
||||||
params = {"tag": tag}
|
|
||||||
return self._pagination(url, params)
|
|
||||||
|
|
||||||
|
|
||||||
class SubscribestarUserExtractor(SubscribestarExtractor):
|
class SubscribestarUserExtractor(SubscribestarExtractor):
|
||||||
"""Extractor for media from a subscribestar user"""
|
"""Extractor for media from a subscribestar user"""
|
||||||
subcategory = "user"
|
subcategory = "user"
|
||||||
pattern = BASE_PATTERN + r"/(?!posts/)([^/?#]+)"
|
pattern = BASE_PATTERN + r"/(?!posts/)([^/?#]+)(?:\?([^#]+))?"
|
||||||
example = "https://www.subscribestar.com/USER"
|
example = "https://www.subscribestar.com/USER"
|
||||||
|
|
||||||
def posts(self):
|
def posts(self):
|
||||||
return self._pagination(f"{self.root}/{self.item}")
|
_, user, qs = self.groups
|
||||||
|
url = f"{self.root}/{user}"
|
||||||
|
|
||||||
|
if qs is None:
|
||||||
|
params = None
|
||||||
|
else:
|
||||||
|
params = text.parse_query(qs)
|
||||||
|
if "tag" in params:
|
||||||
|
self.kwdict["search_tags"] = params["tag"]
|
||||||
|
|
||||||
|
return self._pagination(url, params)
|
||||||
|
|
||||||
|
|
||||||
class SubscribestarPostExtractor(SubscribestarExtractor):
|
class SubscribestarPostExtractor(SubscribestarExtractor):
|
||||||
|
|||||||
@@ -40,6 +40,27 @@ __tests__ = (
|
|||||||
"date": "type:datetime",
|
"date": "type:datetime",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"#url" : "https://www.subscribestar.com/subscribestar?tag=Security",
|
||||||
|
"#comment" : "'tag' query parameter (#8737)",
|
||||||
|
"#class" : subscribestar.SubscribestarUserExtractor,
|
||||||
|
"#count" : 0,
|
||||||
|
"#metadata": "post",
|
||||||
|
|
||||||
|
"author_id" : 11,
|
||||||
|
"author_name": "subscribestar",
|
||||||
|
"author_nick": "SubscribeStar",
|
||||||
|
"content" : "\n<h1>Enhance Your Account Security with OTP</h1>\n<div>In addition to our existing email-based Two-Factor Authentication (2FA), we encourage everyone to use a more secure and convenient method: One-Time Password (OTP) 2FA using authentication apps like 1Password, Google Authenticator etc. To get started:</div>\n<ol>\n<li>Navigate to <strong>Menu → Account Settings</strong>, scroll down to the Authenticator Apps (OTP 2FA) section.</li>\n<li>Click the \"<strong>Set up OTP</strong>\" button and follow the instructions.<br><br>\n</li>\n</ol>\n<div>The entire process should take less than 5 minutes. You can opt out of using email 2FA then.</div>\n<div><br></div>\n<div><strong>Why Choose OTP 2FA Over Email 2FA?</strong></div>\n<div>\n<strong>Stronger Security</strong>: While email 2FA adds an extra layer of protection, OTP 2FA generates codes directly on your mobile device, reducing the risk associated with email interception or unauthorized access.</div>\n<div>\n<strong>Instant Access</strong>: Authentication apps provide time-sensitive codes without the need for an internet connection or waiting for an email to arrive.</div>\n<div>\n<strong>Enhanced Protection Against Phishing</strong>: OTP codes from authentication apps are less susceptible to phishing attacks compared to email-based codes.</div>\n\n",
|
||||||
|
"date" : "dt:2024-09-30 20:46:00",
|
||||||
|
"post_id" : 1320999,
|
||||||
|
"search_tags": "Security",
|
||||||
|
"title" : "Enhance Your Account Security with OTP",
|
||||||
|
"tags" : [
|
||||||
|
"Security",
|
||||||
|
"PlatformUpdates",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"#url" : "https://subscribestar.adult/kanashiipanda",
|
"#url" : "https://subscribestar.adult/kanashiipanda",
|
||||||
"#category": ("", "subscribestar", "user-adult"),
|
"#category": ("", "subscribestar", "user-adult"),
|
||||||
@@ -123,24 +144,4 @@ __tests__ = (
|
|||||||
"date": "dt:2019-04-28 07:32:00",
|
"date": "dt:2019-04-28 07:32:00",
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
|
||||||
"#url" : "https://www.subscribestar.com/subscribestar?tag=Security",
|
|
||||||
"#class" : subscribestar.SubscribestarUserTagExtractor,
|
|
||||||
"#count" : 0,
|
|
||||||
"#metadata": "post",
|
|
||||||
|
|
||||||
"author_id" : 11,
|
|
||||||
"author_name": "subscribestar",
|
|
||||||
"author_nick": "SubscribeStar",
|
|
||||||
"content" : "\n<h1>Enhance Your Account Security with OTP</h1>\n<div>In addition to our existing email-based Two-Factor Authentication (2FA), we encourage everyone to use a more secure and convenient method: One-Time Password (OTP) 2FA using authentication apps like 1Password, Google Authenticator etc. To get started:</div>\n<ol>\n<li>Navigate to <strong>Menu → Account Settings</strong>, scroll down to the Authenticator Apps (OTP 2FA) section.</li>\n<li>Click the \"<strong>Set up OTP</strong>\" button and follow the instructions.<br><br>\n</li>\n</ol>\n<div>The entire process should take less than 5 minutes. You can opt out of using email 2FA then.</div>\n<div><br></div>\n<div><strong>Why Choose OTP 2FA Over Email 2FA?</strong></div>\n<div>\n<strong>Stronger Security</strong>: While email 2FA adds an extra layer of protection, OTP 2FA generates codes directly on your mobile device, reducing the risk associated with email interception or unauthorized access.</div>\n<div>\n<strong>Instant Access</strong>: Authentication apps provide time-sensitive codes without the need for an internet connection or waiting for an email to arrive.</div>\n<div>\n<strong>Enhanced Protection Against Phishing</strong>: OTP codes from authentication apps are less susceptible to phishing attacks compared to email-based codes.</div>\n\n",
|
|
||||||
"date" : "dt:2024-09-30 20:46:00",
|
|
||||||
"post_id" : 1320999,
|
|
||||||
"search_tags": "Security",
|
|
||||||
"title" : "Enhance Your Account Security with OTP",
|
|
||||||
"tags" : [
|
|
||||||
"Security",
|
|
||||||
"PlatformUpdates",
|
|
||||||
],
|
|
||||||
},
|
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user