Skip to content

Instantly share code, notes, and snippets.

@pepijn
Last active October 3, 2019 16:49
Show Gist options
  • Select an option

  • Save pepijn/c683c3b26da66846dbcc to your computer and use it in GitHub Desktop.

Select an option

Save pepijn/c683c3b26da66846dbcc to your computer and use it in GitHub Desktop.
#!/bin/bash
set -x
HOST=https://www.ticketswap.nl
FISSA="$1" # Example: /53148/de-beste-singer-songwriter-van-nederland
while :
do
date
URI=$(curl -s "$HOST$FISSA" \
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36' \
-H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'cache-control: max-age=0' \
--compressed |
grep -B 3 offerurl | grep Aangeboden -A 3 | grep offerurl | head -n 1 | awk -F\" '{print $2}')
if [ ! $URI ]; then
sleep 0
continue
fi
say I can make you feel better
URI="$(curl -s "https://www.ticketswap.nl$URI" \
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36' \
-H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'cache-control: max-age=0' \
--compressed |
grep /reserveren/ | head -n 1 | awk -F\" '{print $2}')"
if [ $URI ]; then
open "$HOST$URI"
fi
sleep 1
done
@noisesfromspace

Copy link
Copy Markdown

Ik heb een soortgelijk programma gemaakt die ipv Ticketswap (die nu dus captach's heeft) het Facebook event naar ticketswap posts zoekt en gelijk opent:
https://github.com/MartijnDevNull/ticketnak

Is gemaakt in Python

@noisesfromspace

Copy link
Copy Markdown

Mocht het nog van pas komen voor iemand

@Jicked

Jicked commented Jul 25, 2017

Copy link
Copy Markdown

Bedankt voor het delen! Zie dat je Lowlands als link hebt gebruikt, succes gehad?

@134343

134343 commented Aug 4, 2017

Copy link
Copy Markdown

@martijn. Thanks voor het delen! Krijg helaas bij je laatste link een 404. Heb je deze verwijderd?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment