Giter Club home page Giter Club logo

twitter-complaint-bot's Introduction

Internet Speed Twitter Bot

A python script that uses selenium webdriver to check the internet speed and tweet at the service provider if the speed is below the promised speed.

Requirements

  • Python 3.x
  • selenium
  • dotenv
  • ChromeDriver
  • Usage

Clone the repository Create a .env file in the same directory as the script and add the following environment variables:

  • path: Path to the ChromeDriver binary
  • email: Twitter email to use for logging in
  • password: Twitter password to use for logging in
  • Install the required packages with pip install -r requirements.txt Run the script with python main.py

Constants

The promised download and upload speeds are set as constants:

  • PROMISED_DOWN = 50
  • PROMISED_UP = 10

Code Walkthrough

  • The script loads environment variables from the .env file using load_dotenv from the dotenv library.
  • The ChromeDriver is initialized with the path from the environment variables.
  • The get_internet_speed method navigates to speedtest.net, clicks the "Go" button, waits for the speed test to complete and retrieves the download and upload speeds.
  • The tweet_at_provider method checks if the download speed is less than the promised speed, logs into Twitter, and tweets at the service provider if the speed is below the promised speed.

twitter-complaint-bot's People

Contributors

lukecan avatar

Watchers

 avatar

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.