Code Monkey home page Code Monkey logo

tw-temp's Introduction

Preamble

Hello this is my own little project for learning and practicing on Python. I choose to build a weather data acquisition app because I consider them to be a easy challenge but they also have the potential to scale in a big way.

I'm using Twitter for displaying the weather data because I previously used IFTTT service to get the weather data and tweet this in like a "service" using the hashtag of my current city, and because of that I grow a small following user base.

By now, IFTTT limit the tweets you can send per day to 24 and that capped me by not tweeting the weather at every hour, (because I had a message that thank every one for following at a given time in the day), that's also a reason to build this and to have the potential to scale and do something else with the Twitter account and weather data.

Tw-temp

Tw-temp is a Twitter bot that uses Beautiful Soup to gather temperature data from Yahoo Weather page (not using Yahoo API) from a specific city. Then using Twitter's API, tweets the temperature in Celcius with Tweepy module at every hour using Github Actions.

Requirements

Tw-temp needs some dependencies for proper functionality:

  • Beautiful Soup 4 - Web Scrapper.
  • Tweepy - Client for Twitter's API.
  • html5lib - HTML Parser.

Usage

First sign up for Twitter Developer access using https://developer.twitter.com/

After forking this repo, you have to create some Github Secrets which are:

  • CONSUMER_KEY
  • CONSUMER_SECRET
  • ACCESS_TOKEN
  • ACCESS_TOKEN_SECRET
  • YAHOO_URL
  • EMAIL

Each Secret must have the proper key generated at the Twitter's Developer page excepting the YAHOO_URL secret.

The YAHOO_URL must be a Yahoo Weather URL like this one in order to work:

https://es-us.noticias.yahoo.com/clima/méxico/tamaulipas/reynosa-24552987/

tw-temp's People

Contributors

cesarpazzi avatar tw-temp-bot avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

tw-temp's Issues

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.