Opentable reservation scraper in golang with nodejs client and gRPC server / client. This code base is meant to serve as an example for creating a simple scraper, gRPC service, and Golang <=> Node.js communication. Odds are this will not be maintained. :-(
Personal use only! May violate Opentable's T&C #13.
$ opentable client search --direct --people 2 --date_time 2017-08-11+15:30 --latitude 33.611746 --longitude -117.7487 --term italian --sort Rating
let client = new opentable.Client()
client.search({
covers: 2, // number of people attending
Limit: 200, // number of results to show
dateTime: new Date(), // date/time of reservation
term: 'italian', // search term used to narrow search
sort: 'Rating', // sort by [Distance, Popularity, Name, Rating]
latitude: '33.611746', // latitude of location to search
longitude: '-117.7487', // longitude of location to search
}).then(data => {
console.log(JSON.stringify(data, null, " "))
}).catch(err => {
console.log(err)
})
{
"350182": {
"ID": "350182",
"Name": "Alessa by Chef Pirozzi",
"URL": "https://opentable.com/restaurant/profile/350182?p=2&sd=2017-08-02%2014%3A30",
"Recommended": "97%",
"Reservations": [
{
"Time": "2017-08-02T14:30:00Z",
"URL": "https://opentable.com/book/validate?rid=350182&d=2017-08-02 14:30&p=2&pt=100&ss=0&sd=2017-08-02 14:30&pofids=&hash=490905459"
},
//...
]
},
//...
}