python爬蟲考試題記錄——獲取class="title"的內容

python考試的時候一道簡單的爬蟲題記錄: 給一個URL後,獲取html內容並提取p標籤中class="title"的文本內容html import requests from bs4 import BeautifulSoup html = """ <html><head><title>TheDormouse'sstory</title></head> <body> <p class="tit
相關文章
相關標籤/搜索