GithubHelp home page GithubHelp logo

jsantias / fifa-wwc-2023-ticket-fetcher Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 26.75 MB

A python app that regularly checks the FIFA Women's World Cup ticket website for an adult ticket and adds to cart

License: MIT License

Python 68.19% PowerShell 31.81%

fifa-wwc-2023-ticket-fetcher's Introduction

Problem

I'm a massive football fan and I was on a mission to snag tickets for the FIFA Women's World Cup match between Australia and France. I literally spent hours browsing the official website and checking out resale platforms, all in the hopes of getting those golden tickets. But here's the kicker โ€“ every time adult tickets popped up, I was way too slow to grab 'em.

I mean, seriously, the whole process was like a broken record: log in, pick the match, refresh the page a million times for tickets. It was driving me nuts! So, being the tech-savvy person I am, I put on my thinking cap and decided to tackle the problem head-on. I cooked up this idea to create an automated system that would magically toss adult tickets into my cart.

No more endless website loops, no more frantic logins. And guess what? It actually worked! I not only got myself a ticket but hooked up a bunch of my buddies too. Cheers to tech wizardry and never missing out on the football action again! ๐ŸŽ‰

Prerequisites

  • Chrome browser installed on your system
  • Python 3.9 and above
  • PowerShell
  • Slack webhook URL (For notifications)

How to run

Method 1: Easiest way to run the app is through PowerShell
  1. Download this repository on your computer
  2. Simply open a PowerShell terminal
  3. Change directory (cd) to the location of the downloaded repository
  4. Run ./run-local.ps1. This will ask you to fill in your fifa username and password, the url to the ticket page, and slack web hook url for notifications.
  5. Keep an eye out for a slack notification or your cart
  6. If you need to edit your credentials or other config you can open the .env file within the repository
Method 2: Old school
  1. Download this repository on your computer

  2. Add a .env file with the following information

    USERNAME=<fifa username here>
    PASSWORD=<fifa password here>
    TARGET_URL=<fifa match ticket url>
    HOOK_URL=<slack webhook url>
    
  3. In a new terminal, change directory to the repository folder and run pip3 install -r requirements.txt

  4. Now run main.py

  5. Keep an eye out for a slack notification or your cart

Gotchas (IMPORTANT! MUST READ)

  1. This script can yield false positives. While tickets might appear as "available" on the website, but they could actually be in the checkout process.
  2. Captchas and waiting rooms can disrupt the automation process for acquiring game tickets. These disruptions compelled me to perform certain steps manually, ensuring the smooth operation of my automation. This included occasionally signing out of my account, waiting for 5 minutes before rerunning the script, or extending the sleep timers to 60 seconds (line 30) in main.py. I had to run the script, complete captchas, and wait in the rooms to allow the script to proceed.
  3. The page refreshes every second (the optimal rate). Reducing this frequency could potentially overload FIFA's website or result in your IP being blocked.
  4. Once the script manages to add a ticket to your cart. Make sure to process the payment within 9 minutes. This and the rest of the steps are manual.
  5. The script only adds one adult ticket to your cart.
  6. Impossible to add independent child tickets to the cart as you need an accompanying adult seat.

It would have been great to execute this script headlessly on a cloud server to automatically secure my tickets. However, as I mentioned earlier, this approach would be challenging due to the need for certain manual steps.

Signs you have a ticket in your cart

  • Your terminal will show "================= HIT! ================="
  • You receive a slack notification (If you have provided a webhook url)
  • The page redirects you to your cart or payment page

Potential Improvements

  • Enhance the PowerShell script to validate user inputs thoroughly.
  • Implement comprehensive unit testing.
  • Provide users with the choice to utilise either Chrome or Edge browsers.
  • Implement an automated mechanism for populating credit card information.
  • Enable the purchase of a specified quantity, n, of tickets.
  • Ability to add more than one ticket to the cart.

Demo

Demo

Did this work?

Be sure to Star this repository and share it with your mates!

Support

Buy me a coffee!

Go the Matildas!!!!

My view at the Australia vs France game

IMG_9014

fifa-wwc-2023-ticket-fetcher's People

Contributors

jsantias avatar

Stargazers

 avatar  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.