twitter-openapi-python 0.0.41__py3-none-any.whl → 0.0.43__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.
- twitter_openapi_python/models/header.py +7 -7
- twitter_openapi_python/tid.py +1 -1
- twitter_openapi_python/utils/api.py +7 -7
- {twitter_openapi_python-0.0.41.dist-info → twitter_openapi_python-0.0.43.dist-info}/METADATA +15 -4
- {twitter_openapi_python-0.0.41.dist-info → twitter_openapi_python-0.0.43.dist-info}/RECORD +9 -9
- {twitter_openapi_python-0.0.41.dist-info → twitter_openapi_python-0.0.43.dist-info}/WHEEL +1 -1
- {twitter_openapi_python-0.0.41.dist-info → twitter_openapi_python-0.0.43.dist-info/licenses}/LICENSE +0 -0
- {twitter_openapi_python-0.0.41.dist-info → twitter_openapi_python-0.0.43.dist-info/licenses}/LICENSE.AGPL +0 -0
- {twitter_openapi_python-0.0.41.dist-info → twitter_openapi_python-0.0.43.dist-info}/top_level.txt +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Dict
|
|
1
|
+
from typing import Dict, Optional
|
|
2
2
|
|
|
3
3
|
from pydantic import Field
|
|
4
4
|
|
|
@@ -7,14 +7,14 @@ from twitter_openapi_python.models import BaseModel
|
|
|
7
7
|
|
|
8
8
|
class ApiUtilsHeader(BaseModel):
|
|
9
9
|
raw: Dict[str, str] = Field()
|
|
10
|
-
connection_hash: str = Field()
|
|
11
|
-
content_type_options: str = Field()
|
|
12
|
-
frame_options: str = Field()
|
|
10
|
+
connection_hash: Optional[str] = Field()
|
|
11
|
+
content_type_options: Optional[str] = Field()
|
|
12
|
+
frame_options: Optional[str] = Field()
|
|
13
13
|
response_time: int = Field()
|
|
14
14
|
tfe_preserve_body: bool = Field()
|
|
15
|
-
transaction_id: str = Field()
|
|
16
|
-
xss_protection: int = Field()
|
|
15
|
+
transaction_id: Optional[str] = Field()
|
|
16
|
+
xss_protection: Optional[int] = Field()
|
|
17
17
|
rate_limit_limit: int = Field()
|
|
18
18
|
rate_limit_remaining: int = Field()
|
|
19
19
|
rate_limit_reset: int = Field()
|
|
20
|
-
twitter_response_tags: str = Field()
|
|
20
|
+
twitter_response_tags: Optional[str] = Field()
|
twitter_openapi_python/tid.py
CHANGED
|
@@ -12,6 +12,6 @@ def get_tid():
|
|
|
12
12
|
home_page_response = bs4.BeautifulSoup(home_page.content, "html.parser")
|
|
13
13
|
ondemand_file_url = get_ondemand_file_url(response=home_page_response)
|
|
14
14
|
ondemand_file = session.get(url=ondemand_file_url) # type: ignore
|
|
15
|
-
ondemand_file_response =
|
|
15
|
+
ondemand_file_response = ondemand_file.text
|
|
16
16
|
ct = ClientTransaction(home_page_response=home_page_response, ondemand_file_response=ondemand_file_response)
|
|
17
17
|
return ct
|
|
@@ -256,17 +256,17 @@ def build_cursor(list: list[models.TimelineTimelineCursor]) -> CursorApiUtilsRes
|
|
|
256
256
|
def build_header(headers: Dict[str, str]) -> ApiUtilsHeader:
|
|
257
257
|
return ApiUtilsHeader(
|
|
258
258
|
raw=headers,
|
|
259
|
-
connection_hash=headers
|
|
260
|
-
content_type_options=headers
|
|
261
|
-
frame_options=headers
|
|
259
|
+
connection_hash=headers.get("x-connection-hash"),
|
|
260
|
+
content_type_options=headers.get("x-content-type-options"),
|
|
261
|
+
frame_options=headers.get("x-frame-options"),
|
|
262
262
|
rate_limit_limit=int(headers.get("x-rate-limit-limit", 0)),
|
|
263
263
|
rate_limit_remaining=int(headers.get("x-rate-limit-remaining", 0)),
|
|
264
264
|
rate_limit_reset=int(headers.get("x-rate-limit-reset", 0)),
|
|
265
|
-
response_time=int(headers
|
|
265
|
+
response_time=int(headers.get("x-response-time", 0)),
|
|
266
266
|
tfe_preserve_body=headers.get("x-tfe-preserve-body") == "true",
|
|
267
|
-
transaction_id=headers
|
|
268
|
-
twitter_response_tags=headers
|
|
269
|
-
xss_protection=int(headers["x-xss-protection"]),
|
|
267
|
+
transaction_id=headers.get("x-transaction-id"),
|
|
268
|
+
twitter_response_tags=headers.get("x-twitter-response-tags"),
|
|
269
|
+
xss_protection= int(headers["x-xss-protection"]) if headers.get("x-xss-protection") is not None else None,
|
|
270
270
|
)
|
|
271
271
|
|
|
272
272
|
|
{twitter_openapi_python-0.0.41.dist-info → twitter_openapi_python-0.0.43.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
2
|
-
Name:
|
|
3
|
-
Version: 0.0.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: twitter_openapi_python
|
|
3
|
+
Version: 0.0.43
|
|
4
4
|
Summary: Twitter OpenAPI
|
|
5
5
|
Home-page: https://github.com/fa0311/twitter_openapi_python
|
|
6
6
|
Author: fa0311
|
|
@@ -10,10 +10,21 @@ Keywords: OpenAPI,OpenAPI-Generator,Twitter OpenAPI
|
|
|
10
10
|
Description-Content-Type: text/markdown
|
|
11
11
|
License-File: LICENSE
|
|
12
12
|
License-File: LICENSE.AGPL
|
|
13
|
-
Requires-Dist:
|
|
13
|
+
Requires-Dist: twitter_openapi_python_generated==0.0.34
|
|
14
14
|
Requires-Dist: pydantic>=2.6
|
|
15
|
+
Requires-Dist: requests<3.0.0,>=2.31.0
|
|
15
16
|
Requires-Dist: urllib3<3.0.0,>=2.1.0
|
|
16
17
|
Requires-Dist: xclienttransaction<2.0.0,>=1.0.0
|
|
18
|
+
Dynamic: author
|
|
19
|
+
Dynamic: author-email
|
|
20
|
+
Dynamic: description
|
|
21
|
+
Dynamic: description-content-type
|
|
22
|
+
Dynamic: home-page
|
|
23
|
+
Dynamic: keywords
|
|
24
|
+
Dynamic: license
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
Dynamic: requires-dist
|
|
27
|
+
Dynamic: summary
|
|
17
28
|
|
|
18
29
|
# twitter_openapi_python
|
|
19
30
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
twitter_openapi_python/__init__.py,sha256=stqYIfWDqM0yC93SQNp4-b2hSz-ONWR3QxOG5g2oREg,339
|
|
2
2
|
twitter_openapi_python/client.py,sha256=9qLnlz6KtkxDzUWnZbsbbeoIVfIesg1unRMYESQ5XrY,6980
|
|
3
3
|
twitter_openapi_python/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
-
twitter_openapi_python/tid.py,sha256=
|
|
4
|
+
twitter_openapi_python/tid.py,sha256=PqwosiLfvOrOdoaWEqbmHL9J1oBPqp60VytOzzp86Xg,809
|
|
5
5
|
twitter_openapi_python/api/__init__.py,sha256=-2hoS75Fp0KvCIWKYQFpvAl0pcbFyt7Be3ood08P7n8,643
|
|
6
6
|
twitter_openapi_python/api/default_api.py,sha256=kq-8kdgs0yL60sbYQx6aMrp6Me3cNvSG2ThO62YPw78,2666
|
|
7
7
|
twitter_openapi_python/api/initial_state_api.py,sha256=eByv3zyjmDHL2bu_rA7_KNvh-oc36AsIUi78Dg1SYK0,2341
|
|
@@ -14,15 +14,15 @@ twitter_openapi_python/api/v11_get_api.py,sha256=Gz5hLf4yJkGdpzjmJIsSqdr1eI6mqtj
|
|
|
14
14
|
twitter_openapi_python/api/v11_post_api.py,sha256=y1jJ5Q_-CYLC4HGjvl3eKDnKdtCVbHVRC2VAbJr8_EM,1945
|
|
15
15
|
twitter_openapi_python/models/__init__.py,sha256=uKZYFWWoXinGRjMU7ErbunUhfsThEuZf8aGFBd7lus0,583
|
|
16
16
|
twitter_openapi_python/models/base.py,sha256=3C1SKqgEZhf3QQIHPNob5vasEV7FE8KxP9rNwWYmHG0,198
|
|
17
|
-
twitter_openapi_python/models/header.py,sha256=
|
|
17
|
+
twitter_openapi_python/models/header.py,sha256=7anvDfzWuK-QNBikskh3Ya3qRCkVVhV6hmyjA1XZB40,664
|
|
18
18
|
twitter_openapi_python/models/initial_state.py,sha256=h8P3hC_tLVSmDuYxB03fuSviz22cpp-4RfSR2npP_Yo,530
|
|
19
19
|
twitter_openapi_python/models/response.py,sha256=ZuaX36mKRsVx5aiJhNw3CjrvVGVaGjMCGdXy28PMFy8,480
|
|
20
20
|
twitter_openapi_python/models/timeline.py,sha256=AoWfrJsonYImlweciaUSjFzmeciaX0zshi7d-FkT4LM,1392
|
|
21
21
|
twitter_openapi_python/utils/__init__.py,sha256=2Am22zCH-BUwPxKnnPoHQvKEF-gWX_eryKgA4OZeiog,449
|
|
22
|
-
twitter_openapi_python/utils/api.py,sha256=
|
|
23
|
-
twitter_openapi_python-0.0.
|
|
24
|
-
twitter_openapi_python-0.0.
|
|
25
|
-
twitter_openapi_python-0.0.
|
|
26
|
-
twitter_openapi_python-0.0.
|
|
27
|
-
twitter_openapi_python-0.0.
|
|
28
|
-
twitter_openapi_python-0.0.
|
|
22
|
+
twitter_openapi_python/utils/api.py,sha256=l80EAhILV55X_6dSMIsQN3VQxu34TX0yY5XuGxf6eRQ,10410
|
|
23
|
+
twitter_openapi_python-0.0.43.dist-info/licenses/LICENSE,sha256=xthyYzrtSmRlBu2gnfuIxzsZeHrqtIZgZPL9UPrYiQU,1524
|
|
24
|
+
twitter_openapi_python-0.0.43.dist-info/licenses/LICENSE.AGPL,sha256=Nv6u1ubULm-E2y6q2-pQPK8s2BzkOltLaVlPKQ3tkcs,35182
|
|
25
|
+
twitter_openapi_python-0.0.43.dist-info/METADATA,sha256=O2YcVuiQRqA1SpAQNDsgtWDMond26RoxN6WMHhuqNQg,3414
|
|
26
|
+
twitter_openapi_python-0.0.43.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
27
|
+
twitter_openapi_python-0.0.43.dist-info/top_level.txt,sha256=wKFCnW_S6aWD3nFPmd65SxZIviiqQ30LqHOLLpcnTdE,23
|
|
28
|
+
twitter_openapi_python-0.0.43.dist-info/RECORD,,
|
{twitter_openapi_python-0.0.41.dist-info → twitter_openapi_python-0.0.43.dist-info/licenses}/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|
{twitter_openapi_python-0.0.41.dist-info → twitter_openapi_python-0.0.43.dist-info}/top_level.txt
RENAMED
|
File without changes
|