Skip to content

Python based scraper to extract lottery result links from KeralaLottery.com

License

Notifications You must be signed in to change notification settings

shine-jayakumar/Kerala-Lottery-Scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kerala-Lottery-Scraper

MIT License

A web-scraper in Python to extract links to lottery results (pdf) from KeralaLottery.com.

The script outputs the data in .csv format and sends an email to a default email address. It can also take an email address as a command-line argument.

The script runs in Headless Chrome mode enabling it to be deployed on Heroku and executed with Heroku CLI.

Scrapped Data To Email

Table of Contents

Packages

How To Deploy

I hope you built your project in a virtual environment. It's going to be lot easier that way.

Make sure you download and install Heroku CLI on your machine.

Create an account for yourself on Heroku.com

Steps:

  1. Open Commmand Prompt/Shell and move to your project directory (ex: cd d:\projects\scraper)

  2. Create a new repository in your project directory

       git init 
    
  3. Add everything in the directory to the repository

       git add . 
    
  4. Commit

       git commit -am "Initial Commit" 
    
  5. Login to Heroku from the command prompt

       heroku login
    

    A new browser instance will open up automatically, allowing you to login. Click on the login button and wait for the confirmation, after which you can close the tab and return to the command prompt.

  6. Creating a new app

       heroku create
    
  7. Push the git

       git push heroku master
    

Your app is now successfully deployed.

Run The App

   heroku run python scraper.py

Getting Started With Heroku

Take a look at this quick guide to Getting Started on Heroku with Python

Script Link

Link: scraper.py

Disclaimer: This script and information provided in this project is for educational purposes only