Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
draget ver0.0
#/bin/env python
import requests
import sys
from pyquery import PyQuery as pq
def get_result(acc):
r = requests.get("http://trace.ddbj.nig.ac.jp/DRASearch/run?acc={}".format(acc))
d =pq(r.content)
d = d("#detail_header")
d = d(".header_link:first")
return d("a").attr("href")
if __name__ == '__main__':
ACC = sys.argv[1]
URL = get_result(ACC)
print "{}/{}.fastq.bz2".format(URL, ACC)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment