twitter

Get Tweet Id using Tweepy TwitterV2

Get Tweet Id using Tweepy TwitterV2 Question: I am trying to make a bot which makes a post and then self replies. The only issue I am having is that response.id is not fetching the tweet id. Could I get any pointers as to the right way to fetch the id of a tweet that …

Total answers: 1

How to find the path for the tweet textbox while using selenium?

How to find the path for the tweet textbox while using selenium? Question: I can’t find the textbox for tweeting while using the auto software selenium.I have tried multiple class-names,xpaths in and around the textbox. driver.get("https://twitter.com/home") twe=driver.find_element(By.XPATH,’//*[@id="react-root"]/div/div/div[2]/main/div/div/div/div[1]/div/div[3]/div/div[2]/div[1]/div/div/div/div[2]/div[1]/div/div/div/div/div/div[2]/div/div/div/div/label/div[1]/div/div/div/div/div/div/div/div/div/div’) twe.send_keys(f"Happy Birthday") but=driver.find_element(By.XPATH,’//*[@id="react-root"]/div/div/div[2]/main/div/div/div/div[1]/div/div[3]/div/div[2]/div[1]/div/div/div/div[2]/div[3]/div/div/div[2]/div/div/span/span’) but.click() Asked By: Akshay || Source Answers: See the below code: driver.get("https://twitter.com/home") twe = WebDriverWait(driver, …

Total answers: 1

How to scrape twitter users based on a certain query using snscrape

How to scrape twitter users based on a certain query using snscrape Question: I am using snscrape to scrape users that have a certain keyword in their bio. the algorithm that I am using right-now is the following: search for tweets that contains a certain words extract the user who tweeted this tweet filter the …

Total answers: 1

Trying to Tweet without API using Python, Selenium and Chrome Web Driver

Trying to Tweet without API using Python, Selenium and Chrome Web Driver Question: With the recent announcement of Twitter charging for their API usage, I am trying to Tweet without it. But I am running into issues, from my Ubuntu box. Below is combination of various Python scripts found online. The error I am running …

Total answers: 1

How to get only tweets from Snscrape?

How to get only tweets from Snscrape? Question: After scraping data from Twitter using Snscrape, I am unable to get only tweets. Under the column for tweet.sourceLabel, I am getting a mixture of twitter, instagram and foursquare. import snscrape.modules.twitter as sntwitter keyword = ‘(COVID OR Corona VĂ­rus)’ maxTweets = 30 tweets = [] for i,tweet …

Total answers: 1

Snscrape sntwitter Error while using query and TwitterSearchScraper: "4 requests to … failed giving up"

Snscrape sntwitter Error while using query and TwitterSearchScraper: "4 requests to … failed giving up" Question: Up until this morning I successfully used snscrape to scrape twitter tweets via python. The code looks like this: import snscrape.modules.twitter as sntwitter query = "from:annewilltalk" for i,tweet in enumerate(sntwitter.TwitterSearchScraper(query).get_items()): # do stuff But this morning without any changes …

Total answers: 4

Can't query Twitter API v2 with elevated acces project/app

Can't query Twitter API v2 with elevated acces project/app Question: I’m trting to query twitter API v2 with elevated research access via tweepy, but it still gives me a 403 Forbidden. client = tweepy.Client( bearer_token=BEARER_TOKEN, # consumer_key=CONSUMER_KEY, # consumer_secret=CONSUMER_SECRET, # access_token=OAUTH_ACCESS_TOKEN, # access_token_secret=OAUTH_ACCESS_TOKEN_SECRET, ) test = client.search_all_tweets(query="#something", start_time = "2023-01-01") print(test) Response: Forbidden: 403 Forbidden …

Total answers: 1

How Does the api.get_retweeter_ids() Actually Work (Tweepy Python)?

How Does the api.get_retweeter_ids() Actually Work (Tweepy Python)? Question: I am really new to twitter api, and I’ve been trying to get a list of IDs of everyone that retweeted a specific tweet. After several attempts i can’t get the ‘api.get_retweeter_ids’ to get every id. It always seems to get a few. I know there …

Total answers: 2

Getting address with geopy takes too long

Getting address with geopy takes too long Question: In the context of a project, I have hydrated 1.6 million tweets, i.e retrieved the metadata associated with the tweets such as date of creation, and location. My tweet dataset contains tweets from all over the world, however, I am only interested in tweets created in the …

Total answers: 1

Searching twitter BIO's – but not getting any results back

Searching twitter BIO's – but not getting any results back Question: when I start my code, it doesn’t return any results, any idea what could be going wrong? I have it searching a yaml file with around 15~ keywords, and if it finds profiles with these keywords, it will notify me of their username + …

Total answers: 1