import requests
from bs4 import BeautifulSoup
.get("https://www.ptt.cc/bbs/MobileComm")
soup = BeautifulSoup(r.text, "html.parser")
sel = soup.select("div.title a")

for s in sel:
    print(s["href"],s.text)
r = requests
arrow
arrow
    文章標籤
    Python
    全站熱搜

    羽 發表在 痞客邦 留言(0) 人氣()