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

KeyError: 'x-ware-csrf-token' #18

Closed
Zeffut opened this issue Aug 26, 2023 · 4 comments
Closed

KeyError: 'x-ware-csrf-token' #18

Zeffut opened this issue Aug 26, 2023 · 4 comments

Comments

@Zeffut
Copy link

Zeffut commented Aug 26, 2023

Hello when i try to upload a video i've got this error can you help me ?

Traceback (most recent call last):
File "e:\Téléchargements\Tiktok-uploader-main\Tiktok-uploader-main\main.py", line 9, in
uploadVideo(session_id, file, title, tags, verbose=True)
File "e:\Téléchargements\Tiktok-uploader-main\Tiktok-uploader-main\Tiktok_uploader.py", line 200, in uploadVideo
x_csrf_token = r.headers["X-Ware-Csrf-Token"].split(',')[1]
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Zeffu\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\structures.py", line 54, in getitem
return self._store[key.lower()][1]
~~~~~~~~~~~^^^^^^^^^^^^^
KeyError: 'x-ware-csrf-token'

@Fabccc
Copy link

Fabccc commented Aug 27, 2023

As this Issue says.

Remove those two lines.

After that, if you get an error likes this:

r = <Response [200]>
r.content = b'{"log_pb":{"impr_id":"2023082711232007B7A306C2B955A9578D"},"status_code":5,"status_msg":"Invalid parameters"}'

You must remove the schedule_time to None. The params seems invalid. I didn't do any investigation

@Zeffut
Copy link
Author

Zeffut commented Aug 27, 2023

It works but now i got this erroe:

[-] An error occured while reaching https://www.tiktok.com/api/v1/item/create/
r = <Response [400]>
r.content = b'<HTML><HEAD>\n<TITLE>Bad Request</TITLE>\n</HEAD><BODY>\n<H1>Bad Request</H1>\nYour browser sent a request that this server could not understand.<P>\nReference&#32;&#35;7&#46;c8f71502&#46;1693141469&#46;2bd36086\n</BODY>\n</HTML>\n'

@Fabccc
Copy link

Fabccc commented Aug 28, 2023

Maybe check out This fork.
It might be because the API changed.

@MiniGlome
Copy link
Owner

#17 (comment)

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