Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upOutput crate pages so that the latest version is easily scrapable #238
Comments
This comment has been minimized.
This comment has been minimized.
|
Re: "for some reason". crates.io is a JavaScript webapp. Static HTML would be more amenable to scraping. |
This comment has been minimized.
This comment has been minimized.
anguslees
commented
Dec 16, 2015
|
Right, crates.io is a javascript app that hits the crates.io API (JSON over HTTP). The good stuff is actually buried in a URL like https://crates.io/api/v1/crates/$crate/versions From our (Debian's) point of view, we need an HTML page somewhere that our tools can scrape looking for Option 1: Option 2: I don't want this to be a big thing, and I'm ok with either approach. |
This comment has been minimized.
This comment has been minimized.
|
I suspect that if y'all have a tool already to turn JSON into HTML that'll be the easiest way forward, it unfortunately isn't trivial to add HTML endpoints for us :( |
This comment has been minimized.
This comment has been minimized.
|
Now that being said we could also just add an endpoint that returns a string corresponding to the latest version |
This comment has been minimized.
This comment has been minimized.
anguslees
commented
Dec 23, 2015
|
Bug (with patch) adding crates.io support to fakeupstream.cgi: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=808790 |
This comment has been minimized.
This comment has been minimized.
anguslees
commented
Dec 23, 2015
|
My fakeupstream.cgi patch is now live, eg: https://qa.debian.org/cgi-bin/fakeupstream.cgi?upstream=crates.io/libc I think we can close this issue now (or reduce its urgency). |
This comment has been minimized.
This comment has been minimized.
|
Thanks @anguslees! |
brson commentedDec 16, 2015
Debian uses automation to scrape web pages for updates to libraries, and for some reason these tools don't seem to easily understand crates.io. Find out what kind of structure they want and implement it.