Last active
August 29, 2015 14:02
-
-
Save renatosnrg/dab2434b7c526f25ac24 to your computer and use it in GitHub Desktop.
Monitor ticket availability at Fifa.com Ticketing System site: https://fwctickets.fifa.com/ticketingsystem.aspx?l=en#Tck2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Monitor ticket availability at Fifa.com Ticketing System site | |
Run this code at https://fwctickets.fifa.com/ticketingsystem.aspx?l=en#Tck2 | |
(use the console available in any browser developer inspector) | |
- configure the timeout between refreshes and the matches you want to monitor | |
- when any available ticket is found a beep sound is played and the refresh stops | |
*/ | |
function checkTicket() { | |
/* configure the timeout in miliseconds */ | |
var timeout = 3000; | |
/* configure the matches you want to monitor */ | |
var matches = ['55', '62', '49']; | |
/* beep url */ | |
var beepUrl = "https://www.proxy-service.de/proxy-service.php?u=http%3A%2F%2Fsoundbible.com%2Fmp3%2FMorse%2520Code-SoundBible.com-810471357.mp3&b=0&f=norefer"; | |
function isAvailable() { | |
for(var i =0; i < matches.length; i++) { | |
var match = matches[i]; | |
if ($('#IMT' + match + ' span[data-content~="badge"]').size() > 0) { | |
return true; | |
} | |
} | |
return false; | |
} | |
function playSound() { | |
var snd = new Audio(beepUrl); | |
snd.play(); | |
} | |
function check() { | |
if (isAvailable()) { | |
playSound(); | |
console.log('Some ticket is available!'); | |
} else { | |
checkTicket(); | |
} | |
} | |
refreshAvailability_new(); | |
setTimeout(check, timeout); | |
} | |
checkTicket(); |
refreshAvailability_new() now checks if the time elapsed between calls is greater than 300 seconds. To be able to properly run your code, you need to set the variable nextValue to 300 before calling refreshAvailability_new().
Vai ter alguma atualização no script com a atualização do site da fifa?
This script doesn't work anymore...
Any ideas on how to get it to work again?
Fix for the recent update on fifa ticketing system.
https://gist.github.com/yvenscolbert/977dbd37ceb26b453ae9
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
do you have a web where i can see the ticket monitor? thanks