Skip to content

Instantly share code, notes, and snippets.

@filipelinhares
Last active November 27, 2017 20:11
Show Gist options
  • Save filipelinhares/5969add12ee424da2d7d3f35267ae0af to your computer and use it in GitHub Desktop.
Save filipelinhares/5969add12ee424da2d7d3f35267ae0af to your computer and use it in GitHub Desktop.

Scraping iFood and Pedidos Já

iFood

The iFood's search queries are made with ajax under the hood sending a POST request to this variable - _ctx+URL_SEARCH+URL_SEARCH_RESTAURANT_AND_DISH (the variable output is /search/restaurantdish).

$.ajax({
  type: "POST",
  data: {
    queryString: $("#searchField").val()
  },
  url: _ctx + URL_SEARCH + URL_SEARCH_RESTAURANT_AND_DISH,
  beforeSend: appendThrobber(a),
  cache: !1
})
.done(...)
.fail(...)

iFood search scripts:: functions-restaurants-search.js functions-restaurants-filter.js

Pedidos Já

Pedidos Já works fine, we can collect their data easily. The issue is: They don't have a price range or something like that, however Pedidos Já has the menu of restaurants with price of each thing.

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