twitter

AttributeError: 'NoneType' object has no attribute 'strip' with Python WebCrawler

你离开我真会死。 提交于 2020-01-06 05:26:15
问题 I'm writing a python program to crawl twitter using a combination of urllib2, the python twitter wrapper for the api, and BeautifulSoup. However, when I run my program, I get an error of the following type: ray_krueger RafaelNadal Traceback (most recent call last): File "C:\Users\Public\Documents\Columbia Job\Python Crawler\Twitter Crawler\crawlerversion9.py", line 78, in <module> crawl(start_follower, output, depth) File "C:\Users\Public\Documents\Columbia Job\Python Crawler\Twitter Crawler

Scope of variable in Javascript problem

橙三吉。 提交于 2020-01-06 04:59:26
问题 var query1 = urlencode($('input[name="searchTerm1"]').val()); //user1 var query2 = urlencode($('input[name="searchTerm2"]').val()); //user1 var rpp = 20; //number of tweets to retrieve out var c=0; var f1=new Array(); var f2=new Array(); var common=new Array(); $.getJSON('http://twitter.com/followers/ids.json?screen_name='+ query1 + '&callback=?', function(data) { f1=data; $('#content').append('p'+f1[0]+'p');//this one is coming }); $.getJSON('http://twitter.com/followers/ids.json?screen_name

Fetching media by urls with Rest API

只谈情不闲聊 提交于 2020-01-06 04:18:12
问题 I would like to retrieve media inside statuses , but as I could read in the docs: For media in direct messages, media_url_https must be accessed via an authenticated twitter.com session or by signing a request with the user’s access token using OAuth 1.0A. It is not possible to directly embed these images in a web page Now my question is, how to do that kind of request using Java API? or however what is the correct request with RestAPI, using App only auth? another question: what is the

Resizing UIImage to post to Twitter Sheet- iOS

青春壹個敷衍的年華 提交于 2020-01-06 04:11:27
问题 I am trying to resize my image in order to attach to twitter sheet. But I am getting error as "No known class for selector method " imageWithImage: (UIImage)image...." " - (void)twitterButtonPressed { UIImage *iconImage=[UIImage imageNamed:@"male_small_0.png"]; // I am having problem in the following line UIImage *iconImage2=[UIImage imageWithImage:iconImage scaledToSize:CGSizeMake(73.0, 73.0)]; } -(UIImage*)imageWithImage:(UIImage*)image scaledToSize:(CGSize)newSize {

How to correctly sign an HTTP request to Twitter's REST API v1.1 in NodeJS?

别说谁变了你拦得住时间么 提交于 2020-01-06 03:55:06
问题 I'm only getting error 32 "Could not authenticate you" when I call twitter.request() (defined in my cloud/twitter.js file) inside Parse Cloud Code. I've done everything Twitter told me to do in "Creating a Signature" and "Authorizing a request" at dev.twitter.com, but I cannot seem to find how to do so. Has anyone else had experience with accessing the Twitter REST API v1.1 using Parse Cloud Code? P.S. You can assume I have the user's "access token" and "token secret" in a Parse.User as

Parse Android - getCurrentUser() objectId is null after twitter login

三世轮回 提交于 2020-01-05 12:12:14
问题 I'm using ParseTwitterUtils.logIn(..) for logging in the user through twitter. When the callback function is called ParseUser.getCurrentUser().getObjectId() is null. If the user successfully logged in with twitter shouldn't the current user get an object id assuming that I have a user saved on the server with that same username and twitter authData ? ParseTwitterUtils.logIn(this, new LogInCallback() { @Override public void done(ParseUser parseUser, ParseException ex) { ParseUser user =

How do I customize and use Phirehose functions?

若如初见. 提交于 2020-01-05 11:47:44
问题 I'm trying to put in a check for Phirehose to stop running after 10 seconds or 100 tweets...basically, I want to be able to stop the script. I was told I could customize the statusUpdate() function or the heartBeat() function, but I'm uncertain how to do that. Right now, I'm just testing with the filter-track.php example. How do I customize the functions, and where should I call them in the class? class FilterTrackConsumer extends OauthPhirehose { /** * Enqueue each status * * @param string

Specify exact time to start and end the collection of tweets using Python Tweepy?

天大地大妈咪最大 提交于 2020-01-05 11:38:50
问题 I am having quite a bit of technical issues. My python script below usually works (when time is in yyyy-mm-dd' format. But during the extremely heavy tweet activities, for example more than 500,000 tweets collected a day, my computer runs out of memory and have to force stop the program. I can work around by looking at the time of the last tweets in the stopped csv file, in this case it's at time 18:44:00. I have tried many time format (for example 'yyyy-mm-dd hh:mm:ss' format as below) but

Specify exact time to start and end the collection of tweets using Python Tweepy?

时光毁灭记忆、已成空白 提交于 2020-01-05 11:38:27
问题 I am having quite a bit of technical issues. My python script below usually works (when time is in yyyy-mm-dd' format. But during the extremely heavy tweet activities, for example more than 500,000 tweets collected a day, my computer runs out of memory and have to force stop the program. I can work around by looking at the time of the last tweets in the stopped csv file, in this case it's at time 18:44:00. I have tried many time format (for example 'yyyy-mm-dd hh:mm:ss' format as below) but

tweepy stream.filter() method doesn't work properly

我怕爱的太早我们不能终老 提交于 2020-01-05 11:34:13
问题 i've got some problems with the tweepy api. I'm just tryin to write a little app that gets me a stream of statuses of one user (ore more), but one would be fine to start with ;-) now: my code is like that: def main(): config = ConfigParser.ConfigParser() config.read('twitter.cfg') username = config.get('Twitter', 'username') password = config.get('Twitter', 'password') listener = StreamWatcherListener() stream = tweepy.Stream(username, password, listener, timeout=None) stream.filter(