/Footy-Events

A Python program that scrapes football fixtures from a website and add those events in your google calendar.

Primary LanguagePython

Footy-Events

Overview:

  • This project Footy Events focusses on scrapping user's team fixtures and adding the fixture as an event in user's Google calendar.

  • The website we are using for scrapping the content is: https://www.skysports.com/

  • If you want fixture for FC Barcelona the site from where the data will be scrapped is: https://www.skysports.com/barcelona-fixtures

  • The following is the basic prototype of our project: Capture

Modules Used(Python):

  1. Python: 3.7.5 (default, Oct 31 2019, 15:18:51) [MSC v.1916 64 bit (AMD64)]
  2. requests: 2.22.0
  3. bs4: 4.8.1
  4. apiclient
  5. google_auth_oauthlib: 0.4.1
  6. pickle: 4.0
  7. re: 2.2.1

Running Process:

  • For running the program run the main_menu.py file.

  • On running it you will be shown some options and have to make a choice. Capture

  • There are four choices:

    1. Enlist Your Team: In this option you can add your team names or can delete them.
    2. Enlist Your Competitions: In this option you can add you competitions.
    3. Run The Process: This option will run the whole process of scrapping and adding the content to your google calendar.
    4. Exit: To exit the program.
  • On picking the first option(i.e. entering 1 in *Enter You Choice:- *), the user will be shown the following options: Capture

    1. Add a Team:

      • On choosing this option, you will be asked to enter the team name.
      • Here you can do two things, either you can enter a single team name or multiple team names.
      • On entering team names a file named footy_teams.txt will be created which will contain all teams you have listed.

      For adding single team Capture

      For adding multiple teams Capture

      footy_teams.txt Capture

    2. Preview Added Teams:

      • This option will display all the teams user has added to footy_teams.txt.

      Preview Added Teams Capture

    3. Delete Added Teams:

      • This option will help users to delete the team names they listed.
      • Either the user can delete one team at a time or multiple teams at a time.
      • If the user want to delete all the team names, then can specify del_all when asked for the team name this will delete footy_teams.txt as well.

      For deleting single team Capture

      For deleting multiple teams Capture

      For deleting all the teams Capture

    4. Back:

      • For going back to the main menu.
  • One entering the second option the user will be shown the following options: Capture

    1. Add a Competiton:

      • Here the user can add the competition's name.
      • The adding can be done in three ways.
      • If the user want to add only few teams featuring in that particular competiton.(1)
      • If the user want to add only few teams featuring in multiple competitions.(2)
      • If the user want to add all the teams featuring in that particular competiton.(3)

      For (1) Capture

      For (2) Capture

      For (3) Capture

    2. Preview Added Competition:

      • This option will display all the competitions the user has listed. Capture
    3. Delete Added Competition:

      • This option will delete the added competiton.
      • The user can perform three actions here.
      • If the user want to delete some teams from a particular competitions.(1)
      • If the user want to delete the competitions.(2)
      • If the user want to delete all competitions.(3)

      For (1) Capture

      For (2)
      Capture

      For (3) Capture

    4. Back:

      • To go back to main menu.
  • The third option is for adding/updating event in the user's google calendar.

  • The user will be asked to enter the username so that the user's calendar info can be saved by that particular user name.

  • Then the user will be given a link from where the user will allow the program the access for his/her google calendar, so that the program can add or update event.

  • The process is shown in the following images:

    Capture

    Capture

    Capture

    Capture

    Capture

    Capture

    Capture

    add_1

    add_2

    add_3

  • And after the main scrapping process, you will see that the events has been added to your google calendar, this is the screenshot of my google calendar after I ran the program:

    add_4