예제 #1
0
def whetherCoauthor(url, name):
        
        pub= rest.download(url)
        cnt= 0

        ## Use Regular expr- concept,
        cnt+= pub.count(name)           
        return 
예제 #2
0
def load(url):
    data = memcache.get(url)
    if data is not None:
      return data
    data = rest.download(url)
    if data:
      memcache.set(url, data, 3600)
      return data
예제 #3
0
def reportPubsYrs(url,odic):

        pub= rest.download(url)         
        yrs= ['2005','2006','2007','2008','2009','2010','2011']
        dic= {}
        for y in yrs:           
                dic[y]= max(int(pub.count(y)), odic[y] )
        return dic