?hello hello~ ,這里是絕命Coding——老白~💖💖 ,歡迎大家點贊🥳🥳關注💥💥收藏🌹🌹🌹
💥個人主頁:絕命Coding-CSDN博客
💥 所屬專欄:后端技術分享
這里將會不定期更新有關后端、前端的內容,希望大家多多點贊關注收藏💖
教程內容: 在本教程中,我們將使用Python編寫一個簡單的爬蟲項目,來爬取指定網頁的HTML內容(由于代碼過于簡單,就不過多解釋)
import urllib.request as http
content=http.urlopen('https://www.toutiao.com/').read()
print(content.decode('utf-8'))
優化(推薦):
import requests
response = requests.get('https://www.toutiao.com/')
print(response.text)
?更多精彩內容請關注:絕命Coding