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