python爬取新聞標題

1.本文以pycharm爲編輯器,爬取搜狐新聞的網頁信息 2.具體代碼如下 import requests from bs4 import BeautifulSoup res =requests.get('http://www.sohu.com/c/8/1460') #防止中文內容亂碼 res.encoding = 'utf-8' soup = BeautifulSoup(res.text,'ht
相關文章
相關標籤/搜索