Skip to content

Instantly share code, notes, and snippets.

@soichih
Last active August 29, 2015 14:12
Show Gist options
  • Save soichih/8053e8ed4fed0ef34119 to your computer and use it in GitHub Desktop.
Save soichih/8053e8ed4fed0ef34119 to your computer and use it in GitHub Desktop.
Download VO Summary URL
#!/usr/bin/python
import urllib2
import libxml2
vo_summary_oasis_url = "http://myosg.grid.iu.edu/vosummary/xml?summary_attrs_showoasis=on&start_type=7daysago&start_date=12%2F24%2F2014&end_type=now&end_date=12%2F24%2F2014&all_vos=on&active=on&active_value=1&oasis=on&oasis_value=1&sort_key=name"
#download vosummary (for oasis enabled)
response = urllib2.urlopen(vo_summary_oasis_url)
xml = response.read()
doc = libxml2.parseDoc(xml)
#parse out the oasis url
for url in doc.xpathEval("//OASISRepoURLs/URL"):
print url.content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment