Friday 28 December 2018

gcs alarm 抢戏票

用 crontab 每分钟跑, 一旦该戏 available to purchase 就会自动打开 gedit 提醒:

* * * * *  if curl -sLk 'https://www.gsc.com.my/html/ddl_showtimes.aspx?cinema=210&movie=DRAGON\%20BALL\%20SUPER:\%20BROLY\%20&opsDate=2018-12-29&control=DLePaymentMovies' -A 'Mozilla/5.0 (X11; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0' | grep '2018-12-29' | grep -i 'selected'; then echo 'Movie Dragon Ball Super available purchase now, fast fast booking :p' > /tmp/gsc; export 'XDG_CURRENT_DESKTOP=GNOME'; export 'GNOME_DESKTOP_SESSION_ID=this-is-deprecated'; export 'DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus'; export 'DISPLAY=:0'; gedit /tmp/gsc; fi


No comments:

Post a Comment