Topic on Talk:Quarry

Jump to navigation Jump to search

There is a way to query and get results programmatically

2
חגי1234 (talkcontribs)

Hi!

Is the url of the query can also return results via code programming?


After it execute in this path "command"

https://quarry.wmflabs.org/query/XXXX

It has the run path "command" to download it to json etc.

https://quarry.wmflabs.org/run/YYYYYY/output/0/json-lines


But there the query path and run path are not related...

Can I know the run number of my query (without html scrapping)?

Or, is there is a way to run the query and download the results using code? (without html scrapping)


Thanks!

Hagay

Framawiki (talkcontribs)

Hi Hagay, "query" id is query id. "run" id is... run id :) The second is get from a http call made by your browser when you look at the first link, search for something like "last run id" in your browser network console. (so plain html scrapping would even not work here). You'll then be able to download in json as requested.

May I attire your attention on the fact that Quarry were not made for automatic querying. Abusing will result in account banning from Quarry. Infrastructure, from execution to storage, dislike that. If it's just temporary, it's good. If it's to run a regular script, please don't use Quarry and rather look at toolforge platform, were you can get direct SQL access.

Thanks!

Reply to "There is a way to query and get results programmatically"