[pillowfort] ignore files without download URL (#846)

This commit is contained in:
Mike Fährmann
2021-01-30 21:48:51 +01:00
parent 23ff936d46
commit a041a017d1

View File

@@ -41,12 +41,15 @@ class PillowfortExtractor(Extractor):
post["created_at"], "%Y-%m-%dT%H:%M:%S.%f%z")
yield Message.Directory, post
for post["num"], file in enumerate(files, 1):
post["num"] = 0
for file in files:
url = file["url"]
post.update(file)
post["date"] = text.parse_datetime(
file["created_at"], "%Y-%m-%dT%H:%M:%S.%f%z")
yield Message.Url, url, text.nameext_from_url(url, post)
if url:
post.update(file)
post["num"] += 1
post["date"] = text.parse_datetime(
file["created_at"], "%Y-%m-%dT%H:%M:%S.%f%z")
yield Message.Url, url, text.nameext_from_url(url, post)
class PillowfortPostExtractor(PillowfortExtractor):