tweepy-self 1.6.0__py3-none-any.whl → 1.6.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.
@@ -3,7 +3,7 @@ twitter/account.py,sha256=tHzBdc34pEJI2SRbjLcmKtwAzjhzUFsa4vIQqtXAc1s,3015
|
|
3
3
|
twitter/base/__init__.py,sha256=x0EHKv4q_FI6xEq2nL4V9s8P6VWr6IaHTqdH9sXB5d8,133
|
4
4
|
twitter/base/client.py,sha256=7byb0Psai-dvg_ww6Y7uyE2hV1pfTU653hFgVdRiqXo,478
|
5
5
|
twitter/base/session.py,sha256=JFPS-9Qae1iY3NfNcywxvWWmRDijaU_Rjs3WaQ00iFA,2071
|
6
|
-
twitter/client.py,sha256=
|
6
|
+
twitter/client.py,sha256=TXcIr-HnuqEtYOAiS5fmvY2P7KumlLE0lOAytMq89N8,61346
|
7
7
|
twitter/enums.py,sha256=-OH6Ibxarq5qt4E2AhkProVawcEyIf5YG_h_G5xiV9Y,270
|
8
8
|
twitter/errors.py,sha256=PsvGP3hps1HNWdKbUPhEkuDqLUmmqzhpAkRtVrJr5jc,5007
|
9
9
|
twitter/models.py,sha256=ttSNuhY1knTdI-Yty54OCJF5YzARc8IaA11zKNHV9p0,2063
|
@@ -11,6 +11,6 @@ twitter/utils/__init__.py,sha256=pyhQXwTdp0HFwV_UNF4dTyklLD9RtaefA16SrQXeNlg,589
|
|
11
11
|
twitter/utils/file.py,sha256=Sz2KEF9DnL04aOP1XabuMYMMF4VR8dJ_KWMEVvQ666Y,1120
|
12
12
|
twitter/utils/html.py,sha256=hVtIRFI2yRAdWEaShFNBG-_ZWxd16og8i8OVDnFy5Hc,1971
|
13
13
|
twitter/utils/other.py,sha256=UnUxS3uDR4eggbNN16xiw96VC_MNt9tOgnBlNWvRBoY,559
|
14
|
-
tweepy_self-1.6.
|
15
|
-
tweepy_self-1.6.
|
16
|
-
tweepy_self-1.6.
|
14
|
+
tweepy_self-1.6.2.dist-info/METADATA,sha256=l6gqyDzQS3HXiwpYlOKpI8Za7d5tuu164TOG2QWSpZk,9136
|
15
|
+
tweepy_self-1.6.2.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
16
|
+
tweepy_self-1.6.2.dist-info/RECORD,,
|
twitter/client.py
CHANGED
@@ -388,7 +388,7 @@ class Client(BaseClient):
|
|
388
388
|
self,
|
389
389
|
image: bytes,
|
390
390
|
attempts: int = 3,
|
391
|
-
timeout: float | tuple[float, float] =
|
391
|
+
timeout: float | tuple[float, float] = 10,
|
392
392
|
) -> int:
|
393
393
|
"""
|
394
394
|
Upload image as bytes.
|
@@ -409,8 +409,18 @@ class Client(BaseClient):
|
|
409
409
|
)
|
410
410
|
media_id = response_json["media_id"]
|
411
411
|
return media_id
|
412
|
-
except HTTPException as exc:
|
413
|
-
if
|
412
|
+
except (HTTPException, requests.errors.RequestsError) as exc:
|
413
|
+
if (
|
414
|
+
attempt < attempts - 1
|
415
|
+
and (
|
416
|
+
isinstance(exc, requests.errors.RequestsError)
|
417
|
+
and exc.code == 28
|
418
|
+
)
|
419
|
+
or (
|
420
|
+
isinstance(exc, HTTPException)
|
421
|
+
and exc.response.status_code == 408
|
422
|
+
)
|
423
|
+
):
|
414
424
|
continue
|
415
425
|
else:
|
416
426
|
raise
|
@@ -595,7 +605,7 @@ class Client(BaseClient):
|
|
595
605
|
tweets = await self.request_tweets(self.account.id)
|
596
606
|
duplicate_tweet = None
|
597
607
|
for tweet_ in tweets:
|
598
|
-
if tweet_.full_text
|
608
|
+
if tweet_.full_text.startswith(text.strip()):
|
599
609
|
duplicate_tweet = tweet_
|
600
610
|
|
601
611
|
if not duplicate_tweet:
|
File without changes
|