Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Fetch data or code associated with a figshare DOI
// metadata: curl -L -H 'Accept: application/citeproc+json' ''
$doc = new DOMDocument;
$xpath = new DOMXPath($doc);
$url = $xpath->query('//div[@id="download_all"]/a')->item(0)->getAttribute('href');
exec(sprintf('wget %s', escapeshellarg($url)));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment