def crawl_repost_by_page(mid, page_num): cur_url = base_url.format(mid, page_num) html = get_page(cur_url, user_verify=False) repost_datas = repost.get_repost_list(html, mid) if page_num == 1: wb_data.set_weibo_repost_crawled(mid) return html, repost_datas
def crawl_repost_by_page(mid, page_num): cur_url = BASE_URL.format(mid, page_num) html = get_page(cur_url, auth_level=1, is_ajax=True) repost_datas = repost.get_repost_list(html, mid) if page_num == 1: WbDataOper.set_weibo_repost_crawled(mid) return html, repost_datas
def crawl_repost_by_page(mid, page_num): cur_url = base_url.format(mid, page_num) html = get_page(cur_url, user_verify=False) repost_datas = repost.get_repost_list(html, mid) if page_num == 1: wb_data.set_weibo_repost_crawled(mid) return html, repost_datas
def crawl_repost_by_page(mid, page_num): cur_url = BASE_URL.format(mid, page_num) html = get_page(cur_url, auth_level=1, is_ajax=True) repost_datas = repost.get_repost_list(html, mid) if page_num == 1: WbDataOper.set_weibo_repost_crawled(mid) return html, repost_datas
def test_parse_repost_info(cookies): url = 'http://weibo.com/aj/v6/mblog/info/big?ajwvr=6&id=4159763183121316&&page=4' content = requests.get(url, cookies=cookies).text assert len(repost.get_repost_list(content, '4141730615319112')) > 0 time.sleep(REQUEST_INTERNAL)