Giter VIP home page Giter VIP logo

playhq-graphql-scraper's Introduction

PlayHQ-GraphQL-Scraper

This allows you to obtain a list of upcoming games for a specific team in PlayHQ and insert it into your calendar with the relevant information.

Quick Example

PlayHQ-GraphQL-scraper$ git clone [email protected]:Jayden-Lind/PlayHQ-GraphQL-scraper.git
PlayHQ-GraphQL-scraper$ python3 -m venv venv
PlayHQ-GraphQL-scraper$ source venv/bin/activate
(venv) PlayHQ-GraphQL-scraper$ pip install -r requirements.txt
(venv) PlayHQ-GraphQL-scraper$ python google-calendar.py https://www.playhq.com/afl/org/frankston-bombers-football-netball-club/08986ec2/mpnfl-2023/teams/frankston-bombers-fnc-reserves/c852e16e
Please visit this URL to authorize this application: https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=xxxxxxxxx&redirect_uri=xxxxx&scope=xxxxxxxx&access_type=offline
2023-02-14 23:19:02 INFO     Round 1 Basketball - Round 1 Bonbeach Reserve Oval 1 Bonbeach Reserve Oval 1 1 is already in your calendar

Usage

  1. Head to your teams fixture page on PlayHQ.
  2. Copy the URL of the fixture page of your team and note this down for later

https://www.playhq.com/basketball-victoria/org/dandenong-basketball-association-inc/senior-domestic-summer-202223/teams/the-expendables/989925f7

  1. Follow https://developers.google.com/calendar/api/quickstart/python by creating an external OAuth consent screen & a Desktop Client OAuth credential.
  2. Download your client secret in a JSON file. Rename this to credentials.json.
  3. In GCP Console -> APIs and Services -> OAuth consent screen -> Test users - add the calendar user that you wish to use this with.
  4. Create new Python virtual environment python3 -m venv venv then activate it

Linux: source venv/bin/activate

Windows: venv\scripts\activate.bat.

  1. Install library requirements pip install -r requirements.txt.
  2. Initialise authentication by running python google-calendar.py.

Open link that looks like below & sign in with your desired account and give permission to your calendar.

(venv) jayden@JD-Desktop:~/PlayHQ-GraphQL-scraper$ python google-calendar.py 
Please visit this URL to authorize this application: https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=xxxxxxxxx&redirect_uri=xxxxx&scope=xxxxxxxx&access_type=offline

playhq-graphql-scraper's People

Contributors

jayden-lind avatar

Stargazers

Dr Nic Williams avatar

Watchers

Mitchell Reidy avatar  avatar

playhq-graphql-scraper's Issues

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.