100行python代碼爬取5萬條網易新聞評論

前幾天學習了一下如何爬取網易新聞動態評論,以demo爲基礎擴展成了100行的小程序,一次能夠獲取5萬多條評論(固然,這取決於當時的評論總數),代碼貼上:html from bs4 import BeautifulSoup import requests import json #global values headers = {'User-Agent':'Mozilla/5.0 (X11; Li
相關文章
相關標籤/搜索