This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
#爬蟲 (PTT表特版) | |
#抓取網頁原始碼 | |
import requests | |
requests.get("https://www.ptt.cc/bbs/beauty/index.html") | |
res = requests.get("https://www.ptt.cc/bbs/beauty/index.html") | |
print(res.text) | |
#操作HTML | |
from bs4 import BeautifulSoup | |
soup = BeautifulSoup(res.text,"html.parser") |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.