[pillowfort] add 'reblogs' option (#846)
This commit is contained in:
parent
7ca3bf7cb0
commit
cdb0b02e30
@ -1223,6 +1223,16 @@ Description
|
|||||||
Download subalbums.
|
Download subalbums.
|
||||||
|
|
||||||
|
|
||||||
|
extractor.pillowfort.reblogs
|
||||||
|
----------------------------
|
||||||
|
Type
|
||||||
|
``bool``
|
||||||
|
Default
|
||||||
|
``false``
|
||||||
|
Description
|
||||||
|
Extract media from reblogged posts.
|
||||||
|
|
||||||
|
|
||||||
extractor.pinterest.sections
|
extractor.pinterest.sections
|
||||||
----------------------------
|
----------------------------
|
||||||
Type
|
Type
|
||||||
|
@ -26,10 +26,14 @@ class PillowfortExtractor(Extractor):
|
|||||||
def __init__(self, match):
|
def __init__(self, match):
|
||||||
Extractor.__init__(self, match)
|
Extractor.__init__(self, match)
|
||||||
self.item = match.group(1)
|
self.item = match.group(1)
|
||||||
|
self.reblogs = self.config("reblogs", False)
|
||||||
|
|
||||||
def items(self):
|
def items(self):
|
||||||
for post in self.posts():
|
for post in self.posts():
|
||||||
|
|
||||||
|
if "original_post" in post and not self.reblogs:
|
||||||
|
continue
|
||||||
|
|
||||||
files = post["media"]
|
files = post["media"]
|
||||||
del post["media"]
|
del post["media"]
|
||||||
|
|
||||||
@ -112,8 +116,8 @@ class PillowfortUserExtractor(PillowfortExtractor):
|
|||||||
pattern = BASE_PATTERN + r"/(?!posts/)([^/?#]+)"
|
pattern = BASE_PATTERN + r"/(?!posts/)([^/?#]+)"
|
||||||
test = ("https://www.pillowfort.social/Pome", {
|
test = ("https://www.pillowfort.social/Pome", {
|
||||||
"pattern": r"https://img\d+\.pillowfort\.social/posts/",
|
"pattern": r"https://img\d+\.pillowfort\.social/posts/",
|
||||||
"range": "1-25",
|
"range": "1-15",
|
||||||
"count": 25,
|
"count": 15,
|
||||||
})
|
})
|
||||||
|
|
||||||
def posts(self):
|
def posts(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user