Questions tagged [python-twitter]

A Python wrapper around the Twitter API

This library provides a pure Python interface for the Twitter API.

Twitter provides a service that allows people to connect via the web, IM, and SMS. Twitter exposes a web services API and this library is intended to make it even easier for Python programmers to use.

151 questions
2
votes
1 answer

Django/Python - ImportError: Could not import settings 'twitter.settings' (Is it on sys.path?): No module named settings

I've recently started my first Django project. I have previously been able to run the command 'python manage.py runserver' without returning any errors but now it returns a long error message which I can't solve... File "manage.py", line 14, in…
Jess
  • 1,749
  • 4
  • 16
  • 17
1
vote
1 answer

python-twitter get image from status

How to get the media url for a particular image from a tweet status. I am using python-twitter library 0.8. statuses = api.GetUserTimeline(count=1, include_entities=True) Status structure provided by Twitter is status.created_at …
Ashish
  • 851
  • 12
  • 27
1
vote
1 answer

Using python-twitter behind a proxy

I have "created" a Twitter parser in Python 2.7, which pretty much can parse everything available from the API. As everyone else the REST API limit is killing me. I am trying to create a social graph (pretty big I'd say) and time is of the essence.…
Giannis H.
  • 145
  • 1
  • 1
  • 9
1
vote
1 answer

access twitter HomeTimeline of user

I am trying to develop a gtk3 desktop application using python to perform the basic twitter functions like accessing the home timeline of a user, making tweets etc. I am using python-twitter library, but am unable to find the API call for the…
Gaurav Sood
  • 157
  • 3
  • 16
1
vote
1 answer

How do I know how many result pages can I get using python-twitter GetSearch() method

I use twitter-python search API to retrieve search results like below import twitter api = twitter.Api() i = 1 result = api.GetSearch("Avatar", page=i) print [s.text for s in result] The code above means I want to get the result on first page…
Peiti Li
  • 4,634
  • 9
  • 40
  • 57
1
vote
1 answer

Twitter Python API in Terminal - Errors installing

I've installed the following libraries and gotten through all the steps in the twitter python setup: httplib2-0.7.1 simplegeo-python-oauth2-1fcc1a6 python-twitter-0.8.2 simplejson-2.1.6 I'm using the setup instructions here:…
Chris
  • 11,819
  • 19
  • 91
  • 145
1
vote
1 answer

Twitter Streaming API: only show tweets directed at a user and tweets from a user

I use the Twitter streaming API to retrieve the tweets that a certain user writes. To do so, I use stream.filter(follow=['user_id']) However, I do not only get the tweets of this user ID, but I guess also replies, retweets (?), I am not quite sure…
1
vote
0 answers

Extract image from video in Python using ffmpeg and subprocess

Me and a friend are currently working on a twitter bot which uploads images taken from randomly chosen video files. We are using ffmpeg, with subprocess.call(), to get out.jpg from a video file, which is working fine when the subtitles are hardcoded…
Mevon
  • 11
  • 3
1
vote
2 answers

"[Errno 2] No such file or directory: [filename] " while trying to configure twarc2 library for fetching twitter data using Twitter api v2

I am trying to install and configure twarc2 library for getting full archive search from twitter. But while configuring using twarc2 configure , After I enter my Bearer token ,I get the error message. I have attached the screenshot of the error…
1
vote
1 answer

How to wait for an external event using an API instead of sending test requests every delta t?

I have put together a very simple twitter bot using the "python-twitter" library. Basically, it waits for a user to tweet something to respond to it. To do this, I used a while loop which compares every minute the last tweet the user posted with the…
Glox
  • 11
  • 3
1
vote
1 answer

tweepy.Cursor returns unrelated search results to the query I selected

As part of my Master's Degree, I need to collect data from Twitter for future machine learning models. What's the problem? I am trying to get tweets with a given hashtag (#), something really simple such as #climatechange, so as I understood from…
Moshe Binieli
  • 343
  • 3
  • 21
1
vote
0 answers

Python module twitter error: "Could not authenticate you"

I want to download a dataset (SemEval 2016/2017) as described in http://alt.qcri.org/semeval2017/task4/index.php?id=data-and-tools which in turn reminds to https://github.com/seirasto/twitter_download the last link provides instructions on how to…
FrancescoVe
  • 1,060
  • 1
  • 7
  • 12
1
vote
0 answers

How to set page parameter twitter api user timeline

How can I get the 3200 most recent tweets from a users timeline as documented? I know I can only get 200 tweets per request. I want to use the page parameter, but the page parameter is no longer present in the current documentation. It did contain…
1
vote
1 answer

Python Twitter - Get tweet URLS

I am using the python-twitter module to get my most recent twitter status updates: for i in range(0, limit): tweet = twitter.Api().GetUserTimeline(TWITTER_USERNAME)[i] tweet.date = datetime.strptime( tweet.created_at, "%a %b %d…
Hanpan
  • 10,013
  • 25
  • 77
  • 115
1
vote
1 answer

python twitter api returns inconsistent number of tweets each second

I'm trying to write my own twitter-fetch api, based on the python-twitter library. The goal is to fetch the last 5 tweets of Donald Trump. I'm getting a different number of tweets every other second or so. Sometimes it's 5 tweets, sometimes it's…
hasdrubal
  • 1,024
  • 14
  • 30
1 2
3
10 11