コード例 #1
0
def grab_shop_prof(key):
    url = 'http://www.dianping.com/shop/{}'.format(key)
    fn = join(page_path['shop_prof'], '{}_shop.html'.format(key))
    c = request(url.format(key), filename=fn)
    return set(sid_ptn.findall(c)) - {key}
コード例 #2
0
def grab_shop_prof(key):
    url = 'http://www.dianping.com/shop/{}'.format(key)
    fn = join(page_path['shop_prof'], '{}_shop.html'.format(key))
    c = request(url.format(key), filename=fn)
    return set(sid_ptn.findall(c)) - {key}
コード例 #3
0
def grab_user_prof(key):
    url = 'http://www.dianping.com/member/{}'.format(key)
    fn = join(page_path['user_prof'], '{}_user.html'.format(key))
    c = request(url.format(key), filename=fn)
    return set(uid_ptn.findall(c))
コード例 #4
0
def grab_user_prof(key):
    url = 'http://www.dianping.com/member/{}'.format(key)
    fn = join(page_path['user_prof'], '{}_user.html'.format(key))
    c = request(url.format(key), filename=fn)
    return set(uid_ptn.findall(c))