Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble logging in #69

Open
ctrlvee opened this issue May 18, 2023 · 2 comments
Open

Trouble logging in #69

ctrlvee opened this issue May 18, 2023 · 2 comments

Comments

@ctrlvee
Copy link

ctrlvee commented May 18, 2023

I'm trying the first step with logging in but having issues with my csrf cookie not getting used correctly?

Traceback (most recent call last): File "/Users/v/Python/instagram_post/main/texts.py", line 12, in <module> client = pytextnow.Client(username) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/v/Python/instagram_post/.venv/lib/python3.11/site-packages/pytextnow/TNAPI.py", line 79, in __init__ 'x-csrf-token': self.get_initial_csrf_token() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/v/Python/instagram_post/.venv/lib/python3.11/site-packages/pytextnow/TNAPI.py", line 100, in get_initial_csrf_token req = requests.get('https://www.textnow.com/messaging', cookies=self.cookies) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/v/Python/instagram_post/.venv/lib/python3.11/site-packages/requests/api.py", line 76, in get return request('get', url, params=params, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/v/Python/instagram_post/.venv/lib/python3.11/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/v/Python/instagram_post/.venv/lib/python3.11/site-packages/requests/sessions.py", line 528, in request prep = self.prepare_request(req) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/v/Python/instagram_post/.venv/lib/python3.11/site-packages/requests/sessions.py", line 456, in prepare_request p.prepare( File "/Users/v/Python/instagram_post/.venv/lib/python3.11/site-packages/requests/models.py", line 318, in prepare self.prepare_cookies(cookies) File "/Users/v/Python/instagram_post/.venv/lib/python3.11/site-packages/requests/models.py", line 575, in prepare_cookies cookie_header = get_cookie_header(self._cookies, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/v/Python/instagram_post/.venv/lib/python3.11/site-packages/requests/cookies.py", line 142, in get_cookie_header jar.add_cookie_header(r) File "/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/cookiejar.py", line 1370, in add_cookie_header attrs = self._cookie_attrs(cookies) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/cookiejar.py", line 1329, in _cookie_attrs self.non_word_re.search(cookie.value) and version > 0): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: expected string or bytes-like object, got 'list' (.venv) v@V instagram_post %

@Kasherpete
Copy link

The current version of PyTextNow, as far as I am aware IS BROKEN due to TextNow breaking it - as of a couple weeks ago. The error message is 403-forbidden, however it seems like you are getting a different error message. I am almost 100% sure it still does not work as this project is no longer being maintained, but if you share a code sample I may be able to point something out in case it does work again.

@TommasShelbyOBE
Copy link

have the same questions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants