twitwi 0.22.0__tar.gz → 0.22.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {twitwi-0.22.0/twitwi.egg-info → twitwi-0.22.1}/PKG-INFO +1 -1
- {twitwi-0.22.0 → twitwi-0.22.1}/setup.py +1 -1
- {twitwi-0.22.0 → twitwi-0.22.1}/twitwi/bluesky/normalizers.py +11 -4
- {twitwi-0.22.0 → twitwi-0.22.1/twitwi.egg-info}/PKG-INFO +1 -1
- {twitwi-0.22.0 → twitwi-0.22.1}/LICENSE.txt +0 -0
- {twitwi-0.22.0 → twitwi-0.22.1}/README.md +0 -0
- {twitwi-0.22.0 → twitwi-0.22.1}/setup.cfg +0 -0
- {twitwi-0.22.0 → twitwi-0.22.1}/test/bluesky/__init__.py +0 -0
- {twitwi-0.22.0 → twitwi-0.22.1}/test/bluesky/formatters_test.py +0 -0
- {twitwi-0.22.0 → twitwi-0.22.1}/test/bluesky/normalizers_test.py +0 -0
- {twitwi-0.22.0 → twitwi-0.22.1}/twitwi/__init__.py +0 -0
- {twitwi-0.22.0 → twitwi-0.22.1}/twitwi/anonymizers.py +0 -0
- {twitwi-0.22.0 → twitwi-0.22.1}/twitwi/bluesky/__init__.py +0 -0
- {twitwi-0.22.0 → twitwi-0.22.1}/twitwi/bluesky/constants.py +0 -0
- {twitwi-0.22.0 → twitwi-0.22.1}/twitwi/bluesky/formatters.py +0 -0
- {twitwi-0.22.0 → twitwi-0.22.1}/twitwi/bluesky/types.py +0 -0
- {twitwi-0.22.0 → twitwi-0.22.1}/twitwi/bluesky/utils.py +0 -0
- {twitwi-0.22.0 → twitwi-0.22.1}/twitwi/constants.py +0 -0
- {twitwi-0.22.0 → twitwi-0.22.1}/twitwi/exceptions.py +0 -0
- {twitwi-0.22.0 → twitwi-0.22.1}/twitwi/formatters.py +0 -0
- {twitwi-0.22.0 → twitwi-0.22.1}/twitwi/normalizers.py +0 -0
- {twitwi-0.22.0 → twitwi-0.22.1}/twitwi/utils.py +0 -0
- {twitwi-0.22.0 → twitwi-0.22.1}/twitwi.egg-info/SOURCES.txt +0 -0
- {twitwi-0.22.0 → twitwi-0.22.1}/twitwi.egg-info/dependency_links.txt +0 -0
- {twitwi-0.22.0 → twitwi-0.22.1}/twitwi.egg-info/requires.txt +0 -0
- {twitwi-0.22.0 → twitwi-0.22.1}/twitwi.egg-info/top_level.txt +0 -0
- {twitwi-0.22.0 → twitwi-0.22.1}/twitwi.egg-info/zip-safe +0 -0
|
@@ -5,7 +5,7 @@ with open("./README.md", "r") as f:
|
|
|
5
5
|
|
|
6
6
|
setup(
|
|
7
7
|
name="twitwi",
|
|
8
|
-
version="0.22.
|
|
8
|
+
version="0.22.1",
|
|
9
9
|
description="A collection of Twitter-related helper functions for python.",
|
|
10
10
|
long_description=long_description,
|
|
11
11
|
long_description_content_type="text/markdown",
|
|
@@ -594,11 +594,13 @@ def normalize_post(
|
|
|
594
594
|
|
|
595
595
|
# Process quotes
|
|
596
596
|
if quoted_data and "value" in quoted_data:
|
|
597
|
-
|
|
597
|
+
# We're checking on the uri as the cid can be different in some cases,
|
|
598
|
+
# and the uri seems to be unique for each post
|
|
599
|
+
if quoted_data["uri"] != post["quoted_uri"]:
|
|
598
600
|
raise BlueskyPayloadError(
|
|
599
601
|
post["url"],
|
|
600
|
-
"inconsistent quote
|
|
601
|
-
% (post["
|
|
602
|
+
"inconsistent quote uri found between record.embed.record.uri & embed.record.uri: %s %s"
|
|
603
|
+
% (post["quoted_uri"], quoted_data),
|
|
602
604
|
)
|
|
603
605
|
|
|
604
606
|
quoted_data["record"] = quoted_data["value"]
|
|
@@ -706,7 +708,12 @@ def normalize_post(
|
|
|
706
708
|
repost_data["indexedAt"], locale=locale, source="bluesky"
|
|
707
709
|
)
|
|
708
710
|
|
|
709
|
-
|
|
711
|
+
try:
|
|
712
|
+
post["text"] = text.decode("utf-8")
|
|
713
|
+
except UnicodeDecodeError as e:
|
|
714
|
+
raise UnicodeDecodeError(
|
|
715
|
+
f"Failed to decode post text: {e}\nPost URL: {post['url']}\nOriginal text bytes: {text}"
|
|
716
|
+
)
|
|
710
717
|
|
|
711
718
|
if collection_source is not None:
|
|
712
719
|
post["collected_via"] = [collection_source]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|