Skip to content

An example of a twitter bot that fetches the weather data from OpenWeatherMap, written in Python

Notifications You must be signed in to change notification settings

failedmath/weather-twitter-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

weather-twitter-bot

An example of a twitter bot that fetches weather data from OpenWeatherMap. It chooses a random city from the list, connects to the OpenWeatherMap and checks the weather. Working version of the bot (currently not running becuase time for free dynos from Heroku is over) can be found here.

Requirements

  • Python 2.7 + packages: tweepy, virtualenv
  • Twitter API keys + creating a twitter app
  • Heroku account
  • OpenWeatherMap API key

Notes

All the secret keys are written down in the document .env in the format KEY='API KEY' for safety.

The requirements can be checked in requirements.txt

Heroku is used to run the python code from a server, it has a free dyno for 550 hours per month. Sometimes the dyno has to be turned on manually from the webpage.

Some useful resources

A little bit on twitter API and Heroku setup can be found here

Heroku connection

OpenWeatherMap

About

An example of a twitter bot that fetches the weather data from OpenWeatherMap, written in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages