Online contest results monitor.
Introduction:If you are an active user of a community that carries out incredible contests such as hackster, you would have had the problem of waiting for the organizers to upload the results of a contest. Crazily pressing refresh of the website with the hope to see how your project winning.
If you have experienced that, then we have the solution to your problem!
Connection Diagram:Laptop:For this, I programed an algorithm that checks if a web page has any change, in the particular case of hackster, the pages for contests, that look like this:
And transforms to this:
Therefore we will first install a software that allows python to run correctly with your OS, for windows I will use Anaconda.
Install Firefox:If your main browser is not firefox, download it, it is necessary for the script to work properly, you do not need to make it your main browser.
https://www.mozilla.org/en-US/firefox/new/
Install Geckodriver:Windows:Add the folder called "Monitor" from the Github repository to the Environment Variables:
https://www.kenst.com/2016/12/installing-marionette-firefoxdriver-on-mac-osx/
Linux:Go to the geckodriver releases page. Find the latest version of the driver for your platform and download it. For example:
wget https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz
Extract the file with:
tar -xvzf geckodriver*
Make it executable:
chmod +x geckodriver
Add the driver to your PATH so other tools can find it:
export PATH=$PATH:/path-to-extracted-file/.
There are many ways to do this that will work. The above works for me on Ubuntu 16.10 64-bit.
Install Anaconda:The Anaconda documentation already has this guide:
https://docs.anaconda.com/anaconda/install/
Create an OpenCv Environment:In your command console, type the following command to create a specialized environment for this project:
conda create --name myenv
Once the environment is created, write the following commands to activate the environment and install the necessary libraries, one command per line:
activate myenv
pip install selenium opencv-python webbrowser
If everything was done correctly, you can run the script, the script can be executed with the following command.
python check.py "YOUR_URL_CONTEST"
Real Example for April 17, 2020:
python check.py "https://www.hackster.io/contests/OnSemi"
EPIC DEMO:
Comments
Please log in or sign up to comment.