Esempio n. 1
0
def parse_title(tt):
    title = None
    try:
        title = {}
        title['id'] = unicode(tt)
        tt_main = cm.query_request("http://www.imdb.com/title/" + tt)
        #tt_money = cm.query_request("http://www.imdb.com/title/" + q + "/business")
        soup = bs4.BeautifulSoup(tt_main.text)
        try:
            title['mpaa'] = parse_mpaa_rating(soup)
        except:
            pass
    except:
        pass
    return title
Esempio n. 2
0
def parse_name(nm):
    nm_main = cm.query_request("http://www.imdb.com/name/" + nm)
    soup = bs4.BeautifulSoup(nm_main.text)
    name = {}
    name['id'] = nm
    return name