0
我想從網站使用內置搜索功能,但我一直從主頁面獲取結果。不知道我做錯了什麼。無法使用網站搜索功能
import requests
from bs4 import BeautifulSoup
body = {'input':'ferris'} # <-- also have tried'query'
con = requests.post('http://www.collegedata.com/', data=body)
soup = BeautifulSoup(con.content, 'html.parser')
products = soup.findAll('div', {'class': 'schoolCityCol'})
print(soup)
print (products)