GitXplorerGitXplorer
p

cian-search

public
5 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
444c3c79eaefe2484b1a3b7739a3b136c8a20b85

Fix various bugs

ppetuhovskiy committed 5 years ago
Unverified
f6a85a068bdbe53203d66dd420db375c38187ce2

Improve sheet logic

ppetuhovskiy committed 5 years ago
Unverified
0018e4ea6047384d95305cae6086a99398996bf2

Add initial google sheets export

ppetuhovskiy committed 5 years ago
Unverified
e75a687da3d50d441e2edc3f132a7f1ab24b17e3

Add query example

ppetuhovskiy committed 5 years ago
Unverified
ae82bf683d0100b3b564bcf389858de59532d5c7

Implement offers fetching

ppetuhovskiy committed 5 years ago
Verified
3b9fed02688a52241d785266229756fbb26154ac

Initial commit

ppetuhovskiy committed 5 years ago

README

The README file for this repository.

cian-search

fetch data from cian

Usage

go run cmd/fetch/main.go [-query=query.json] [-result=result.json]

The command takes query.json as a query, fetches and saves result to result.json.

Query

To obtain custom query, go to cian search and modify query as you like. After that, you need to open developer tools in your browser, and find that request in network tab.

  • URL to search: https://api.cian.ru/search-offers/v2/search-offers-desktop/
  • This is POST request, body is subject.
  • In Firefox it can be copied from Request payload in right-bottom corner.

My Firefox example:

query_example.png

Pages

If request contains $page instead of page number, it gets replaced by pages 1 to +inf, until empty page is received.

Output format

Output format is plain json array, with json objects. Single array element represents single offer.

upload data to google sheets

Run

go run cmd/sheet/main.go -sheet=12google-sheets-doc-id