GithubHelp home page GithubHelp logo

yasulab / simpletwitterbot Goto Github PK

View Code? Open in Web Editor NEW
34.0 34.0 12.0 436 KB

Gather tweets including 'search_term' on Twitter, and re-tweet it. This bot runs on Google App Engine. The following twitter account shows a sample bot run on Google App Engine.

Python 75.44% C 24.56%

simpletwitterbot's Introduction

Abstract

This bot runs in the following ways.

  1. Search tweets using search_term in Twitter.

  2. Re-tweet the tweets.

In this example, search_term is Cafe Miyama, and you can see how it behaves by checking the following account.

http://twitter.com/cafemiyamabot

How to setup

  1. Register your OAuth client on Twitter URL: http://twitter.com/oauth_clients NOTE: You MUST change permission settings to Read & Write if you wanna update via API. The default is Read Only.

  2. Run python register_pin.py and use CONSUMER_KEY and CONSUMER_SECRET you got from the registeration. NOTE: Make sure you are now signing in Twitter as your Bot account when visiting a given URL.

  3. Change setting variables (CONSUMER_KEY and CONSUMER_SECRET) in main.py to the given ones.

  4. Run Google App Engine dev_server and visit the following URL URL: http://localhost:8080/cron/update

    • If you finish all of your setting, set debug_flag in main.py off.
  5. Done!

Enjoy developing your own twitter bot!

YasuLab [email protected]

simpletwitterbot's People

Contributors

yasulab avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

simpletwitterbot's Issues

urllib2.URLError

C:\Documents and Settings\hugo.delacruz\github\Simple-Twitter-Bot>python regist_pin.py
What is your CONSUMER_KEY? xxxxxxxxxxxxxxxx
What is your CONSUMER_SECRET? xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Traceback (most recent call last):
File "regist_pin.py", line 44, in <module>
if name == "main": main(sys.argv)
File "regist_pin.py", line 36, in main
tw = twitter()
File "regist_pin.py", line 18, in twitter
request_token = tw.getRequestToken()
File "C:\Documents and Settings\hugo.delacruz\github\Simple-Twitter-Bot\oautht
witter.py", line 201, in getRequestToken
resp = self._FetchUrl(url, no_cache=True)
File "C:\Documents and Settings\hugo.delacruz\github\Simple-Twitter-Bot\oautht
witter.py", line 109, in _FetchUrl
url_data = opener.open(url).read()
File "C:\Python26\lib\urllib2.py", line 391, in open
response = self._open(req, data)
File "C:\Python26\lib\urllib2.py", line 409, in _open
'_open', req)
File "C:\Python26\lib\urllib2.py", line 369, in _call_chain
result = func(*args)
File "C:\Python26\lib\urllib2.py", line 1169, in https_open
return self.do_open(httplib.HTTPSConnection, req)
File "C:\Python26\lib\urllib2.py", line 1136, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno 1] _ssl.c:480: error:140770FC:SSL routin
es:SSL23_GET_SERVER_HELLO:unknown protocol>

C:\Documents and Settings\hugo.delacruz\github\Simple-Twitter-Bot>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.