diff --git a/example/requirements.txt b/example/requirements.txt index a9f74522..77416567 100644 Binary files a/example/requirements.txt and b/example/requirements.txt differ diff --git a/example/sample/login.py b/example/sample/login.py index a3fee112..8267a518 100644 --- a/example/sample/login.py +++ b/example/sample/login.py @@ -9,6 +9,9 @@ def login(): if Path("cookie.json").exists(): with open("cookie.json", "r") as f: cookies_dict = json.load(f) + + if isinstance(cookies_dict, list): + cookies_dict = {cookie['name']: cookie['value'] for cookie in cookies_dict} cookies = RequestsCookieJar() for key, value in cookies_dict.items(): cookies.set(key, value) diff --git a/twitter_openapi_python/pyproject.toml b/twitter_openapi_python/pyproject.toml index 87f7d16a..dfda360f 100644 --- a/twitter_openapi_python/pyproject.toml +++ b/twitter_openapi_python/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "twitter_openapi_python" -version = "0.0.40" +version = "0.0.41" description = "Twitter OpenAPI" authors = ["fa0311 "] license = "proprietary" # or "AGPL-3.0-only" diff --git a/twitter_openapi_python/setup.py b/twitter_openapi_python/setup.py index 950765cd..f14fa0d5 100644 --- a/twitter_openapi_python/setup.py +++ b/twitter_openapi_python/setup.py @@ -5,7 +5,7 @@ from setuptools import find_packages, setup NAME = "twitter_openapi_python" -VERSION = "0.0.40" +VERSION = "0.0.41" PYTHON_REQUIRES = ">=3.7" REQUIRES = [ "twitter_openapi_python_generated == 0.0.33", diff --git a/twitter_openapi_python/tool/publish.ps1 b/twitter_openapi_python/tool/publish.ps1 index 1f890ca3..58db2cd8 100644 --- a/twitter_openapi_python/tool/publish.ps1 +++ b/twitter_openapi_python/tool/publish.ps1 @@ -1,5 +1,5 @@ pip install wheel twine -Remove-Item twitter_openapi_python_generated.egg-info/* +Remove-Item twitter_openapi_python.egg-info/* Remove-Item dist/* python setup.py sdist python setup.py bdist_wheel diff --git a/twitter_openapi_python/twitter_openapi_python/client.py b/twitter_openapi_python/twitter_openapi_python/client.py index e9d2b045..2054f751 100644 --- a/twitter_openapi_python/twitter_openapi_python/client.py +++ b/twitter_openapi_python/twitter_openapi_python/client.py @@ -54,10 +54,10 @@ def get_user_list_api(self) -> UserListApiUtils: return UserListApiUtils(twitter.UserListApi(self.api), self.placeholder, self.ct) def get_v11_get_api(self) -> V11GetApiUtils: - return V11GetApiUtils(twitter.V11GetApi(self.api), self.placeholder, self.ct) + return V11GetApiUtils(twitter.V11GetApi(self.api), self.placeholder) def get_v11_post_api(self) -> V11PostApiUtils: - return V11PostApiUtils(twitter.V11PostApi(self.api), self.placeholder, self.ct) + return V11PostApiUtils(twitter.V11PostApi(self.api), self.placeholder) class TwitterOpenapiPython: