gevent協程爲啥返回的是同一頁

import requestsimport geventfrom gevent import monkeymonkey.patch_all()def next_payload():    for i in range(2, 8):        request_payload = {            'CategoryId': 808,            'CategoryType': 'SiteHome',            'ItemListActionName': 'Postlist',            'PageIndex': i,            'ParentCategoryId': 0,            'TotalPostCount': 4000        }        yield request_payloaddef start_crawl():    response = requests.post(        url='https://www.cnblogs.com/mvc/AggSite/PostList.aspx',        data=next(next_payload()),        headers={            'Referer': 'https://www.cnblogs.com/',            'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36',        }    )    f = open('cnblogs.txt', 'a', encoding='utf8')    f.write(response.text)    f.close()gevent.joinall([    gevent.spawn(start_crawl()),    gevent.spawn(start_crawl()),    gevent.spawn(start_crawl()),    gevent.spawn(start_crawl()),    gevent.spawn(start_crawl()),    gevent.spawn(start_crawl())])爬蟲小白一枚,想練練手,選擇了博客園首頁的最新博客,想練習一下多頁爬取,但是不知道爲何,爬出來的東西,好像仍是同一頁,是我哪裏寫錯了麼。但願有大佬能指導我一下。
相關文章
相關標籤/搜索