1
0
Fork 0
mirror of synced 2024-06-25 09:30:36 +12:00

Fix bug where file extension is never specified for text posts

This commit is contained in:
Serene-Arc 2021-03-11 11:38:21 +10:00 committed by Ali Parlakci
parent 945116063f
commit d3c8897f6a

View file

@ -17,7 +17,7 @@ class SelfPost(BaseDownloader):
super().__init__(post)
def find_resources(self, authenticator: Optional[SiteAuthenticator] = None) -> list[Resource]:
out = Resource(self.post, self.post.url)
out = Resource(self.post, self.post.url, '.txt')
out.content = self.export_to_string().encode('utf-8')
out.create_hash()
return [out]