Either list all available databases with db=None, or
Specific information on a particular database (e.g. pubmed) with db=pubmed.
"""
- params = urlencode ({
+ params = urlencode({
'db': db,
'tool': TOOL,
'email': EMAIL})
LOG.info("getting einfo from '%s?%s'" % (EINFO_URL, params))
- f = urllib.urlopen ("%s?%s" % (EINFO_URL, params))
+ f = urllib.urlopen("%s?%s" % (EINFO_URL, params))
string = f.read()
f.close()
LOG.debug('got:\n%s' % string)
if field != None:
validate_field(field)
validate_search_term(term, valid_fields)
- params = urlencode ({
+ params = urlencode({
'tool': TOOL,
'email': EMAIL,
'term': term,
'sort': sort})
LOG.info("getting esearch from '%s?%s'" % (ESEARCH_URL, params))
- f = urllib.urlopen ("%s?%s" % (ESEARCH_URL, params))
+ f = urllib.urlopen("%s?%s" % (ESEARCH_URL, params))
string = f.read()
f.close()
LOG.debug('got:\n%s' % string)
for d in id:
idstring += "%s," % d
idstring = idstring[:-1] # remove trailing comma
- params = urlencode ({
+ params = urlencode({
'tool': TOOL,
'email': EMAIL,
'id': idstring,
'rettype': rettype})
LOG.info("getting efetch from '%s?%s'" % (EFETCH_URL, params))
- f = urllib.urlopen ("%s?%s" % (EFETCH_URL, params))
+ f = urllib.urlopen("%s?%s" % (EFETCH_URL, params))
string = f.read()
f.close()
LOG.debug('got:\n%s' % string)
idstring += "%s," % d
idstring = idstring[:-1] # remove trailing comma
- params = urlencode ({
+ params = urlencode({
'tool': TOOL,
'email': EMAIL,
'id': idstring,
'retmode': retmode})
LOG.info("getting elink from '%s?%s'" % (ELINK_URL, params))
- f = urllib.urlopen ("%s?%s" % (ELINK_URL, params))
+ f = urllib.urlopen("%s?%s" % (ELINK_URL, params))
if cmd == 'prlinks' and retmode == 'ref':
# Just get the link, we don't need the provider's webpage HTML.