mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
encode surrogatepass to avoid error when inserting into postgres
This commit is contained in:
parent
65115b3ba7
commit
f9ce8f6b3e
1 changed files with 2 additions and 1 deletions
|
|
@ -371,7 +371,8 @@ async def main():
|
|||
reading_progress_top_percent = source.get('readingProgressTopPercent', 0)
|
||||
reading_progress_percent = source.get('readingProgressPercent', 0)
|
||||
reading_progress_anchor = source.get('readingProgressAnchorIndex', 0)
|
||||
content = source['content']
|
||||
# encode surrogatepass to avoid error when inserting into postgres
|
||||
content = source['content'].encode('utf-8', 'surrogatepass').decode('utf-8')
|
||||
description = source.get('description', None)
|
||||
|
||||
# skip item if content is larger than 1MB
|
||||
|
|
|
|||
Loading…
Reference in a new issue