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

Twt #209

Open
Delightai6881 opened this issue Nov 17, 2023 · 0 comments
Open

Twt #209

Delightai6881 opened this issue Nov 17, 2023 · 0 comments

Comments

@Delightai6881
Copy link

Import the requests library to make HTTP requests

import requests

Define the base URL for x.com

base_url = "https://x.com/"

Define the parameters for the tweet

tweet_id = "1720926200938328329"
tweet_user = "DelightAi6881"
tweet_status = "100079554185239"
tweet_mode = "M"
tweet_uid = "176982567"
tweet_ua = "play.google.com/store/apps/details?id=com.google.android.apps.walletnfcrel&pcampaignid=web_4"

Define the parameter for the Twitter Space

space_id = "1lDGLPYowoaGm"

Construct the tweet URL

tweet_url = base_url + tweet_user + "/status/" + tweet_id + "?i=" + tweet_user + "/status/" + tweet_status + "?id=" + tweet_mode + "&uid=" + tweet_uid + "ua=" + tweet_ua

Construct the Twitter Space URL

space_url = tweet_url + "/?twt=" + space_id

Print the tweet URL and the Twitter Space URL

print("Tweet URL:", tweet_url)
print("Twitter Space URL:", space_url)

Make a GET request to the tweet URL and check the status code

response = requests.get(tweet_url)
if response.status_code == 200:
print("The tweet URL is valid and accessible.")
else:
print("The tweet URL is invalid or inaccessible.")

Make a GET request to the Twitter Space URL and check the status code

response = requests.get(space_url)
if response.status_code == 200:
print("The Twitter Space URL is valid and accessible.")
else:
print("The Twitter Space URL is invalid or inaccessible.")

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

1 participant