tweets

Scraping one tweet per user using snscrape

Scraping one tweet per user using snscrape Question: I’m using snscrape.modules.twitter.TwitterSearchScraper() function to scrape tweets for a specific location and time interval. The code is the following one: loc =’40.4165, -3.70256, 10km’ query = ‘geocode:"{}" since:2020-03-15 until:2020-05-01’.format(loc) tweets_list = [] for tweet in sntwitter.TwitterSearchScraper(query).get_items(): if i==100: break tweets_list.append([tweet.date, tweet.user.username, tweet.user.id, tweet.coordinates, tweet.rawContent]) My question is …

Total answers: 1

having error while using 'Series' object has no attribute 'ix'

having error while using 'Series' object has no attribute 'ix' Question: ‘Series’ object has no attribute ‘ix’ refer this image (https://i.stack.imgur.com/yLm32.png)](https://i.stack.imgur.com/yLm32.png) Asked By: Anas Khan || Source Answers: I believe .iloc is used for Series instead of .ix. Answered By: Peter Dowdy

Total answers: 1

Sns scraper code – alteration for date range and maximum tweet count

Sns scraper code – alteration for date range and maximum tweet count Question: # importing libraries and packages import snscrape.modules.twitter as sntwitter import pandas import time import pandas as pd # Creating list to append tweet data ManUtd_list = [] # Using TwitterSearchScraper to scrape data and append tweets to list for i,tweet in enumerate(sntwitter.TwitterSearchScraper(‘Man …

Total answers: 1

A practical example of GSDMM in python?

A practical example of GSDMM in python? Question: I want to use GSDMM to assign topics to some tweets in my data set. The only examples I found (1 and 2) are not detailed enough. I was wondering if you know of a source (or care enough to make a small example) that shows how …

Total answers: 4

AttributeError: 'float' object has no attribute 'lower'

AttributeError: 'float' object has no attribute 'lower' Question: I’m facing this attribute error and I’m stuck at how to handle float values if they appear in a tweet.The streaming tweet has to be lower cased and tokenized so i have used split function. Can somebody please help me to deal with it, any workaround or …

Total answers: 6