arcade-x 0.1.15__tar.gz → 0.1.16__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: arcade_x
3
- Version: 0.1.15
3
+ Version: 0.1.16
4
4
  Summary: Arcade.dev LLM tools for X (Twitter)
5
5
  Author-email: Arcade <dev@arcade.dev>
6
6
  License-File: LICENSE
@@ -82,9 +82,10 @@ def expand_urls_in_tweets(
82
82
  new_tweet = tweet_data.copy()
83
83
  if "entities" in new_tweet and "urls" in new_tweet["entities"]:
84
84
  for url_entity in new_tweet["entities"]["urls"]:
85
- short_url = url_entity["url"]
86
- expanded_url = url_entity["expanded_url"]
87
- new_tweet["text"] = new_tweet["text"].replace(short_url, expanded_url)
85
+ if "url" in url_entity and "expanded_url" in url_entity:
86
+ short_url = url_entity["url"]
87
+ expanded_url = url_entity["expanded_url"]
88
+ new_tweet["text"] = new_tweet["text"].replace(short_url, expanded_url)
88
89
 
89
90
  if delete_entities:
90
91
  new_tweet.pop("entities", None)
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "arcade_x"
7
- version = "0.1.15"
7
+ version = "0.1.16"
8
8
  description = "Arcade.dev LLM tools for X (Twitter)"
9
9
  requires-python = ">=3.10"
10
10
  dependencies = [ "arcade-tdk>=2.0.0,<3.0.0", "httpx>=0.27.2,<1.0.0",]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes