Twitter X-Client-Transaction-Id generator written in python.
Project description
X-Client-Transaction-ID
Twitter X-Client-Transaction-Id generator written in python.
Reference :
- Twitter Header: Part 1, Deobfuscation
- Twitter Header: Part 2, Reverse Engineering
- Twitter Header: Part 3, Generating the header
Installation
Install XClientTransaction with pip
pip install XClientTransaction
Usage/Examples
python quickstart.py
OR
from x_client_transaction import ClientTransaction
response = None # get twitter home page response (check quickstart.py)
# Example 1
# replace the url and http method as per your use case
url = "https://x.com/i/api/1.1/jot/client_event.json"
method = "POST"
path = urlparse(url=url).path
# path will be /i/api/1.1/jot/client_event.json in this case
# Example 2
user_by_screen_name_url = "https://x.com/i/api/graphql/1VOOyvKkiI3FMmkeDNxM9A/UserByScreenName"
user_by_screen_name_http_method = "GET"
user_by_screen_name_path = urlparse(url=url).path
# path will be /i/api/graphql/1VOOyvKkiI3FMmkeDNxM9A/UserByScreenName in this case
ct = ClientTransaction(response)
transaction_id = ct.generate_transaction_id(method=method, path=path)
transaction_id_for_user_by_screen_name_endpoint = ct.generate_transaction_id(
method=user_by_screen_name_http_method, path=user_by_screen_name_path)
print(transaction_id)
print(transaction_id_for_user_by_screen_name_endpoint)
Authors
Feedback
If you have any feedback, please reach out to us at hello@sarabjitdhiman.com or contact me on Social Media @iSarabjitDhiman
Support
For support, email hello@sarabjitdhiman.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xclienttransaction-0.0.7.tar.gz.
File metadata
- Download URL: xclienttransaction-0.0.7.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3bc4686b6026938b7b2fb617f33284ba7e219a4a2eda3f53caa8642d71b2f639
|
|
| MD5 |
5626737a371449965c5105a864046c46
|
|
| BLAKE2b-256 |
f128232c36f02f315c0d5255c1d60f1c64e05cb96beb0105c974792a17c72de6
|
File details
Details for the file xclienttransaction-0.0.7-py3-none-any.whl.
File metadata
- Download URL: xclienttransaction-0.0.7-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
64330a1aac8963b82d941db8401e909a4537ed2d91cd8cd8d257a5eb6420c4bb
|
|
| MD5 |
a820120158a7c5a61d3fe29bf4253015
|
|
| BLAKE2b-256 |
c860ced1b16bd85f8c4ecc0fcd97fd43f58956e2ca227811905ee7fa43e6bf41
|