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}
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))