Created
September 17, 2018 04:41
-
-
Save tstromberg/60a519b9b2f356e8670a4eea0cb7955d to your computer and use it in GitHub Desktop.
theflybook / sly park availability
This file contains hidden or 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
| # 1055 is "Tent Only" | |
| % curl 'https://go.theflybook.com/vx/entities/find' -H 'Origin: https://go.theflybook.com' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: en-US,en;q=0.9' -H 'User-Agent: Mozilla/5.0 (X11; CrOS x86_64 11021.13.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.16 Safari/537.36' -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json, text/plain, */*' -H 'Referer: https://go.theflybook.com/Book/356/6f3cf449-4837-48f3-a553-fc57985a8eba/0' -H 'Connection: keep-alive' -H 'DNT: 1' -H 'X-FB-API-KEY: de2ab706-c36f-4381-82be-2a45c621366b' -H 'Sec-Metadata: destination="", site=same-origin' --data-binary '{"categoryId":1055}' --compressed > /tmp/sites | |
| % egrep -o 'entityId": (.*),' /tmp/sites | cut -d" " -f2 | cut -d, -f1 | xargs > /tmp/sitenums | |
| % for i in $(cat /tmp/sitenums); do echo $i; curl -s "https://go.theflybook.com/vx/lodging/$i/AvailabilityDatesOnly" -H 'Origin: https://go.theflybook.com' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: en-US,en;q=0.9' -H 'User-Agent: Mozilla/5.0 (X11; CrOS x86_64 11021.13.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.16 Safari/537.36' -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json, text/plain, */*' -H 'Referer: https://go.theflybook.com/Book/356/6f3cf449-4837-48f3-a553-fc57985a8eba/0' -H 'Connection: keep-alive' -H 'DNT: 1' -H 'X-FB-API-KEY: de2ab706-c36f-4381-82be-2a45c621366b' -H 'Sec-Metadata: destination="", site=same-origin' --data-binary '{"start":"2018-09-28T07:00:00.000Z","end":"2018-10-01T07:00:00.000Z"}' --compressed; done | tee /tmp/avail | |
| % egrep -B4 '386|482|484|489|546|529|482|484|489|492|493|495|496|497' /tmp/sites > /tmp/tent.avail |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
More accurate:
egrep -B4 'entityId.*(386|482|484|489|546|529|482|484|489|492|493|495|496|497)' /tmp/sites