twitter-openapi-python 0.0.31__py3-none-any.whl → 0.0.32__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.
@@ -58,10 +58,12 @@ class TwitterOpenapiPythonClient:
58
58
 
59
59
 
60
60
  class TwitterOpenapiPython:
61
- hash: str = "4b27150977e1bdd807de8969dc0ddd7918ac9923"
61
+ hash: str = "8b2d05d1525404a29730f740a259026502be7cbd"
62
62
  placeholder_url = "https://raw.githubusercontent.com/fa0311/twitter-openapi/{hash}/src/config/placeholder.json"
63
63
  header = "https://raw.githubusercontent.com/fa0311/latest-user-agent/refs/heads/main/header.json"
64
- access_token: str = "AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA"
64
+ access_token: str = (
65
+ "AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA"
66
+ )
65
67
  twitter_url: str = "https://x.com/home"
66
68
  additional_browser_headers = {}
67
69
  additional_api_headers = {}
@@ -73,9 +75,7 @@ class TwitterOpenapiPython:
73
75
  ignore = ["host", "connection"]
74
76
 
75
77
  def getHader(name: str) -> dict[str, str]:
76
- return {
77
- key: value for key, value in data[name].items() if key not in ignore
78
- }
78
+ return {key: value for key, value in data[name].items() if key not in ignore}
79
79
 
80
80
  return (
81
81
  {
@@ -107,17 +107,12 @@ class TwitterOpenapiPython:
107
107
  def kebab_to_upper_camel(self, text: dict[str, Any]) -> dict[str, Any]:
108
108
  res = {}
109
109
  for key, value in text.items():
110
- new_key = "".join(
111
- [x.capitalize() for x in self.remove_prefix(key).split("-")]
112
- )
110
+ new_key = "".join([x.capitalize() for x in self.remove_prefix(key).split("-")])
113
111
  res[new_key] = value
114
112
  return res
115
113
 
116
114
  def cookie_normalize(self, cookie: list[str]) -> dict[str, str]:
117
- return {
118
- x.split("; ")[0].split("=")[0]: x.split("; ")[0].split("=")[1]
119
- for x in cookie
120
- }
115
+ return {x.split("; ")[0].split("=")[0]: x.split("; ")[0].split("=")[1] for x in cookie}
121
116
 
122
117
  def cookie_to_str(self, cookie: dict[str, str]) -> str:
123
118
  return "; ".join([f"{key}={value}" for key, value in cookie.items()])
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: twitter-openapi-python
3
- Version: 0.0.31
3
+ Version: 0.0.32
4
4
  Summary: Twitter OpenAPI
5
5
  Home-page: https://github.com/fa0311/twitter_openapi_python
6
6
  Author: fa0311
@@ -1,5 +1,5 @@
1
1
  twitter_openapi_python/__init__.py,sha256=stqYIfWDqM0yC93SQNp4-b2hSz-ONWR3QxOG5g2oREg,339
2
- twitter_openapi_python/client.py,sha256=zs95e9BLmYLMfO5ZF3XqrSlj2wMBCeOHsYALtBNd8fQ,6836
2
+ twitter_openapi_python/client.py,sha256=F4tfgtnYlIfotsg2xg_VzCjbGv9RHwgJxHOQvhxYeb4,6753
3
3
  twitter_openapi_python/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  twitter_openapi_python/api/__init__.py,sha256=-2hoS75Fp0KvCIWKYQFpvAl0pcbFyt7Be3ood08P7n8,643
5
5
  twitter_openapi_python/api/default_api.py,sha256=oYKuwEtj9Y072qmP5Rlc-BQAOmvntHbcwzYscL30ivc,2557
@@ -19,9 +19,9 @@ twitter_openapi_python/models/response.py,sha256=ZuaX36mKRsVx5aiJhNw3CjrvVGVaGjM
19
19
  twitter_openapi_python/models/timeline.py,sha256=AoWfrJsonYImlweciaUSjFzmeciaX0zshi7d-FkT4LM,1392
20
20
  twitter_openapi_python/utils/__init__.py,sha256=2Am22zCH-BUwPxKnnPoHQvKEF-gWX_eryKgA4OZeiog,449
21
21
  twitter_openapi_python/utils/api.py,sha256=NLLPNaG0A4O1XF6qa97M-3FLOR3CjqBH48mW_alVVyw,9964
22
- twitter_openapi_python-0.0.31.dist-info/LICENSE,sha256=xthyYzrtSmRlBu2gnfuIxzsZeHrqtIZgZPL9UPrYiQU,1524
23
- twitter_openapi_python-0.0.31.dist-info/LICENSE.AGPL,sha256=Nv6u1ubULm-E2y6q2-pQPK8s2BzkOltLaVlPKQ3tkcs,35182
24
- twitter_openapi_python-0.0.31.dist-info/METADATA,sha256=ng96VtAVSwzwOgsf1WEbybKrKgs1rtFsBofQtYyFBvA,3070
25
- twitter_openapi_python-0.0.31.dist-info/WHEEL,sha256=Xo9-1PvkuimrydujYJAjF7pCkriuXBpUPEjma1nZyJ0,92
26
- twitter_openapi_python-0.0.31.dist-info/top_level.txt,sha256=wKFCnW_S6aWD3nFPmd65SxZIviiqQ30LqHOLLpcnTdE,23
27
- twitter_openapi_python-0.0.31.dist-info/RECORD,,
22
+ twitter_openapi_python-0.0.32.dist-info/LICENSE,sha256=xthyYzrtSmRlBu2gnfuIxzsZeHrqtIZgZPL9UPrYiQU,1524
23
+ twitter_openapi_python-0.0.32.dist-info/LICENSE.AGPL,sha256=Nv6u1ubULm-E2y6q2-pQPK8s2BzkOltLaVlPKQ3tkcs,35182
24
+ twitter_openapi_python-0.0.32.dist-info/METADATA,sha256=NsNe27Zjw9gDxOwEbUJrZ0jEermp5my_gmZftlmJc9c,3070
25
+ twitter_openapi_python-0.0.32.dist-info/WHEEL,sha256=Xo9-1PvkuimrydujYJAjF7pCkriuXBpUPEjma1nZyJ0,92
26
+ twitter_openapi_python-0.0.32.dist-info/top_level.txt,sha256=wKFCnW_S6aWD3nFPmd65SxZIviiqQ30LqHOLLpcnTdE,23
27
+ twitter_openapi_python-0.0.32.dist-info/RECORD,,