Git Product home page Git Product logo

twitter_quote_bot's Introduction

Twitter_quote_bot

A project for webscraping Goodreads for quotes, and automatically posting them on Twitter.

This was a fun project to practice webscraping using BeautifulSoup, parsing through webpage contents and interacting with Twitter API (In addition to webscraping, I implemented OOP for better coding practice - see TwitterOOP.py). The code is run indefinitely on pythonanywhere.com. You can find my implementation at https://twitter.com/PhilosClassica.

Installations:

In order for the project to run successfully, make sure to install the following libraries:

  • Tweepy
  • BeautifulSoup

Use pip install to install libraries.

Instructions:

  1. Run the Webscraper.py. Add your own authors, and make sure to scan webpapge URLs to obtain the specific page ID. Add them to the author dictionary. After making HTTP requests, it will compile all quotes into a list. Once cleaned, it will then create text files with all the quotes that have been wrangled.
  2. Apply for Twitter API access. This will allow you to post quotes on Twitter without violating terms and conditions - like spamming. This should take a day or two.
  3. Upload the text files and the main.py file onto pythonanywhere.com. This will run your code indefinitely on their servers.

Note: Webpages can change. You may have to make alterations based on the changes of the webpages.

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.