Questions tagged [twint]

A scraping library for Twitter that doesn't use the Twitter API.

62 questions
0
votes
1 answer

Unable to clean the csv file in python

I am trying to load a CSV file into python and clean the text. but I keep getting an error. I saved the CSV file in a variable called data_file and the function below cleans the text and supposed to return the clean data_file. import pandas as…
Yoshith Kotla
  • 135
  • 1
  • 3
  • 13
0
votes
1 answer

how can I name my csv file as timestamp when getting data from twint

I am using twint for web crawling data form twitter. For that reason whenever I save my output file as csv, I want to name current timestamp but it is giving me an error inport twint c = twint.Config() c.Search = "NationBehindState" c.Limit =…
0
votes
1 answer

Unable to tokenise data in python

This is my code, I want to import a CSV file and only tokenize texts from one column. the column is named 'tweet'. I'm unable to get the output for this code import nltk import pandas as pd import numpy from nltk import sent_tokenize from nltk…
Yoshith Kotla
  • 135
  • 1
  • 3
  • 13
0
votes
1 answer

How to exclude usernames in search queries in Twint module

import os import twint import nest_asyncio import pandas nest_asyncio.apply() c = twint.Config() SearchString = "(covid19 OR covid OR covid-19) until:2020-01-01 since:2019-12-01)" c.Search = SearchString c.Lang = "en" c.Pandas =…
Yoshith Kotla
  • 135
  • 1
  • 3
  • 13
0
votes
2 answers

Scrape join-dates/user info from a list (csv) of Twitter-users

I'm looking for a solution to a probably quite simple problem and really would appreciate some help or a hint. I have basic knowledge of python and webscraping. I want to explore a certain hashtag and the community behind it on twitter. Using twint…
0
votes
1 answer

Twint scraping: ClientPayloadError: Response payload is not completed

While I was scraping Tweets about a certain hashtag using twint, I received the error below. Can anyone explain me why this error occurs and how can I fix the problem? Because the tweets to a certain date were scraped, however, the other tweets…
0
votes
1 answer

Building wheels for pycare (setup.py) ...error

I'm trying to install Twint, and everytime I try to install the package, I get an error involving pycares. I've tried installing pycares by itself, and I get the same error. I do not have Ares installed or c_ares installed. I also do not have…
0
votes
0 answers

How to handle 2 different errors in Python 3, both of which are ValueError

I have a list of twitter usernames that I use to get tweets. During the process, I face 2 main errors: CRITICAL:root:twint.get:User:'user' raise ValueError("Cannot find twitter account with name = " + self.config.Username) ValueError: Cannot find…
Musa G.
  • 23
  • 2
0
votes
1 answer

Calculating the frequency of tweets containing a specific word in a single year

I am trying to calculate the number of tweets of a single word for a single year while writing down each day and its number of tweets and store than to store it in CSV file with "Date" and "Frequency." This is my code, but I keep getting an error…
Cekcenk
  • 1
  • 1
0
votes
0 answers

Sentiment Analysis for Twitter with Python (separating queries from the rest of tweets)

I'm doing some sentiment analysis for my organisation using Python. I'm trying to find a way to separate queries that are raised by people from the rest of the tweets associated with the organisation twitter handles. Is there a way to go about doing…
Robin0105
  • 31
  • 6
0
votes
0 answers

How to get location data in twint

import twint twi = twint.Config() twi.Search = 'political' twi.Custom["tweet"] = ["id", "date", "place", "geo", "language", "username", "tweet"] twi.Lang = "in" twi.Output = "tes.csv" twi.Store_csv = True twi.Limit = 20 twint.run.Search(twi) how do…
0
votes
2 answers

Unable to install python twint package under MacOS Catalina

I want to install pip3 install twint but I get the error: ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Python/3.8' Consider using the `--user` option or check the permissions. what command do…
0
votes
1 answer

Twint search not working with date parameters (python)

I'm trying to run a twint search to retrieve a list of tweets, on which I perform sentiment analysis on. I've created a for loop that iterates through a pandas dataframe of dates and runs the twint search with given date parameters. Here's my…
arj.sng
  • 3
  • 3
0
votes
2 answers

Search multiple words in Twint Python Library

I would like to search for multiple words using the Twint Python Library. However, I can only find guidance on searching for one word within tweets. So, for example, "twint -s "pregnant" --since "2020-03-01 13:13:59" -o "sample.csv" --csv" gathers…
Code20
  • 1
  • 1
  • 2
0
votes
0 answers

Python "ImportError: No module named twint" on Atom trying to use twint (Python Module)

I'm currently playing around with Python and the Twint module. The problem is that when I try to run the program in Atom, I permanently get this error message: Error Message ("ImportError: No module named twint") The funny thing is that the error…
Paul S.
  • 1
  • 2