Beispiel #1
0
	def bidref(self,bid):
		'''Get reference information from bing ID'''
		requestsSession = requests.Session()
		requestsSession.mount('http://', requests.adapters.HTTPAdapter(max_retries=5))
		try:
			params={"type":"endnote"}
			r=requestsSession.get("http://mylib.chinacloudsites.cn/Paper/Citation/"+str(bid),params=params,headers=self.hdr,timeout=20)
			print "get ref time:",r.elapsed
			sys.stdout.flush()
			if (r.status_code is 200):
				j=Jrecord()
				return j.parseenw(r.text)
			return Jrecord()
		except requests.exceptions.ConnectionError:
			print "ConnectionError: Fail to find ref info for bid: "+bid
			return Jrecord()
Beispiel #2
0
 def reset(self):
     Jrecord.reset(self)
     del self.journals[:]
     del self.issns[:]
Beispiel #3
0
 def reset(self):
     Jrecord.reset(self)
     del self.journals[:]
     del self.issns[:]
Beispiel #4
0
 def __init__(self):
     Jrecord.__init__(self)
     # new for crossref multi-value
     self.journals = []
     self.issns = []
Beispiel #5
0
 def __init__(self):
     Jrecord.__init__(self)
     #new for crossref multi-value
     self.journals = []
     self.issns = []