A scraping library for Twitter that doesn't use the Twitter API.
Questions tagged [twint]
62 questions
1
vote
1 answer
TypeError: replace() argument 2 must be str, not int
I am trying to scrape for Tweets using Twint. The goal is to get tweets based on a keyword and print them according to the custom format provided by me. While setting up the twint configurations to scrape , I faced the following…

TheUnluckyVJ
- 42
- 1
- 12
1
vote
1 answer
unable to tokenise whole column
I want to tokenize data from CSV file. I'm using this code and I'm unable to tokenize the entire column. I am only able to tokenize the first row in the column. The column is known as 'tweet'.
import pandas as pd
import nltk
from nltk import…

Yoshith Kotla
- 135
- 1
- 3
- 13
1
vote
2 answers
How to scrape twitter data from specific years and specific locations using Twint
import twint
import nest_asyncio
import pandas as pd
nest_asyncio.apply()
c = twint.Config()
c.Search = "Covid-19"
twint.run.Search(c)
The above code collects tweets that have the word covid-19 but I want the tweets only from last year and a…

Yoshith Kotla
- 135
- 1
- 3
- 13
1
vote
2 answers
twint issue time data '2020–04–29 00:00:00' does not match format '%Y-%m-%d %H:%M:%S'
I faced an issue when I want to scrape data from Twitter configuring Since and Until. I use the format like this '2020-01-01 00:00:00':
config = twint.Config()
# ...
config.Since = "2020–04–29 00:00:00"
config.Until = "2020–05–29…

jpko
- 21
- 3
1
vote
2 answers
Resolve masked/shortened URL twint is scraping from twitter
I am using twint for scraping twitter profiles.
When I run this script:
c = twint.Config()
c.Username = username
c.Store_object = True
c.Store_object_users_list = users
c.Hide_output = True
twint.run.Lookup(c)
try:
…

Lasha Dolenjashvili
- 166
- 8
1
vote
2 answers
Twint Python library is causing exception for search query
I have to collect some data from Twitter via Search. Unfortunately, its not possible to get Twitter API as they have rejected my request many times. I have decided to use twint python module for this purpose. I have installed latest version via git…

Hafiz Muhammad Shafiq
- 8,168
- 12
- 63
- 121
1
vote
1 answer
How to get **only** the number of Tweets as output from Twint (Twitter)?
With the code twint -s 'Nike SB Dunk Low Safari' --since "2020-03-07 00:00:00" --until "2020-03-14 00:00:00" --count -o file1.csv --csv we want to get the number of Tweets as output from Twint (Twitter). At the moment, we get the full data load…

Steffen Sturm
- 11
- 2
0
votes
1 answer
Twint output list is returning 'NoneType' Error
I'm writing a simple program to save a given twitter user's tweets word-by-word into a .csv file, as well as using nltk to tag them with parts of speech.
When attempting to iterate through twint.output.tweets_list, I receive the following…

Cype
- 13
- 6
0
votes
0 answers
Twint error "Your proxy appears to only use HTTP and not HTTPS, try changing your proxy URL to be HTTP"
i'm tryin scape twitter using twint but keeps intrupting by this error.
i'm using VPN.
on jupyter i have this error : "ClientConnectorError: Cannot connect to host twitter.com:443 ssl:True [Connect call failed ('10.10.34.36', 443)]"
and on cmd i…

hosein b
- 1
0
votes
0 answers
AttributeError: 'Config' object has no attribute 'Utc'
I am trying to learn sentiment analysis using vaderSentiment. For some reason, the when I create a query, I am getting the above error. I've checked the documentation, and there is no mention of a Utc attribute being required. Here is the basic code…

Mark Scholes
- 75
- 2
- 6
0
votes
0 answers
Twint: Twitter Data Extraction
I am extracting data from Twitter using Twint. The following code extracts tweets that contain my target keyword. After extracting all the relevant tweets, it changes the data to a dataframe (Tweets_df). While it is running it is storing the data in…

Minda Belete
- 1
- 1
0
votes
0 answers
Having an issue with user_business_profile_state while scrapping Twitter with TWINT
I am actually using TWINT to sort out some data on twitter and I am facing a problem.
Indeed, here is first the repo of TWINT : https://github.com/twintproject/twint
So the thing is for exemple for this two users :
https://twitter.com/hansvonrueden…

aleph93
- 1
0
votes
0 answers
Twint Twitter Scraper - date / time function not working (--since)
Having the following issue trying to scrap data with following code with TWINT:
twint --search "ElonMusk -filter:replies" --since "2022-01-01" --links exclude --csv -o EM1.csv --lang "en"
Scraping never goes further back than 2022-11-22 for some…

dBx21
- 1
0
votes
0 answers
ValueError: time data does not match format '%Y-%m-%d %H:%M:%S'
I use twint for scraping data from twitter. Code as follows
import twint
import nest_asyncio
nest_asyncio.apply()
# Configure
c = twint.Config()
c.Limit = 500
c.Since = '2022-01-01'
c.Until = '2022–02–25 23:51:31.926'
c.Search =…

Raffi El
- 17
- 5
0
votes
2 answers
How to scrape twitter tweets of a specific language in Python?
I want to scrape tweets of only Urdu language for my project using python. I started researching how to scrape Twitter tweets. Three prominent ways I found so far.
Tweepy Using Twitter API
Twint Using Twitter API
Selenium
However, I still can't…

Umair Mayo
- 43
- 7