Skip to content

Instantly share code, notes, and snippets.

@nicokosi
Created November 25, 2018 18:12
Show Gist options
  • Save nicokosi/c62e809a5ec42aac4f0343f675d8e7bb to your computer and use it in GitHub Desktop.
Save nicokosi/c62e809a5ec42aac4f0343f675d8e7bb to your computer and use it in GitHub Desktop.
ZSH shell command that searches https://www.leboncoin.fr (for Yamaha 125 YBR in Ile-de-France)
(curl -s 'https://api.leboncoin.fr/finder/search' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:64.0) Gecko/20100101 Firefox/64.0' -H 'Accept: */*' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Referer: https://www.leboncoin.fr/aw/mes-recherches/' -H 'api_key: ba0c2dad52b3ec' -H 'content-type: text/plain;charset=UTF-8' -H 'origin: https://www.leboncoin.fr' -H 'DNT: 1' -H 'Connection: keep-alive' --data '{"filters":{"category":{"id":"3"},"owner":{},"keywords":{"type":"subject","text":"yamaha YBR"},"location":{"region":"12","regions":["12"],"locations":[{"region_id":"12","label":"Ile-de-France","locationType":"region"}]},"enums":{"ad_type":["offer"]}},"counters":{},"limit":35,"sort_by":"time","sort_order":"desc","user_id":"bfdbcf98-4dd9-4545-9eb5-6cd0159a3d8f","store_id":"15616030"}' | md5 && date) > ~/lbc.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment