twitwi 0.19.0__py3-none-any.whl → 0.19.2__py3-none-any.whl

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/normalizers.py CHANGED
@@ -330,7 +330,11 @@ def normalize_tweet(tweet, locale=None, extract_referenced_tweets=False,
330
330
  media_urls.append(med_url.split('?tag=')[0])
331
331
  media_files.append('%s_%s' % (source_id, med_name))
332
332
  media_alt_texts.append(entity.get("ext_alt_text") or '')
333
- else:
333
+
334
+ # NOTE: fun fact, Twitter is starting to break down and we cannot guarantee
335
+ # expanded_url exists anymore. It even crashes the website itself lol:
336
+ # https://x.com/lmerzeau/status/426318495450943488
337
+ elif "expanded_url" in entity:
334
338
  normalized = custom_normalize_url(entity['expanded_url'])
335
339
  links.add(normalized)
336
340
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: twitwi
3
- Version: 0.19.0
3
+ Version: 0.19.2
4
4
  Summary: A collection of Twitter-related helper functions for python.
5
5
  Home-page: http://github.com/medialab/twitwi
6
6
  Author: Béatrice Mazoyer, Guillaume Plique, Benjamin Ooghe-Tabanou
@@ -4,11 +4,11 @@ twitwi/client_wrapper.py,sha256=vX3viQ97xTQ9JJfztnNRCGrfJm-XYpdswo6NDItXufQ,5056
4
4
  twitwi/constants.py,sha256=KG0yIyWaLlwpqxxud75fsEY3n3CPio6uFWqZL9I401Y,16509
5
5
  twitwi/exceptions.py,sha256=3AlspgS4u6Y2skbCKluVJnCQcnY-y7AI9UbMNMTn7Ak,532
6
6
  twitwi/formatters.py,sha256=rK4IBBH-0PMRxQdDZ5szHKBk-J-AzefN8Wdj79L7YiY,3111
7
- twitwi/normalizers.py,sha256=S6_ImrIZoIdZlw7j1D0w-Mh7tKGw1_FRKeuon5pJ5zw,27434
7
+ twitwi/normalizers.py,sha256=L4YcQZudizP7gdHQmhwafT6o39uGNk3cxtOcA9U7OKE,27694
8
8
  twitwi/utils.py,sha256=iBxlCKjwPOz3RKIa8I_vs7d1miRi-eMXMpobKC5apZI,2349
9
- twitwi-0.19.0.dist-info/LICENSE.txt,sha256=Ddg_PcGnl0qd2167o2dheCjE_rCZJOoBxjJnJhhOpX4,1099
10
- twitwi-0.19.0.dist-info/METADATA,sha256=DX-z5q1wW7tN_9Tm2f4p-IfN3RAccxGTdr4W2C_Zx4A,4159
11
- twitwi-0.19.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
12
- twitwi-0.19.0.dist-info/top_level.txt,sha256=kellKVCFa_xo69jlXUtZXY2RYDd9ywdBe_-_iYK4W74,7
13
- twitwi-0.19.0.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
14
- twitwi-0.19.0.dist-info/RECORD,,
9
+ twitwi-0.19.2.dist-info/LICENSE.txt,sha256=Ddg_PcGnl0qd2167o2dheCjE_rCZJOoBxjJnJhhOpX4,1099
10
+ twitwi-0.19.2.dist-info/METADATA,sha256=wigdEBMaf3jq-z89cWt2F3lhuQkWL9-lb6qeu0WbWuI,4159
11
+ twitwi-0.19.2.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
12
+ twitwi-0.19.2.dist-info/top_level.txt,sha256=kellKVCFa_xo69jlXUtZXY2RYDd9ywdBe_-_iYK4W74,7
13
+ twitwi-0.19.2.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
14
+ twitwi-0.19.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.42.0)
2
+ Generator: setuptools (70.2.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5