【发布时间】:2021-11-18 23:11:04
【问题描述】:
我正在从网络获取数据,但我不能像 json 或字典那样使用它。
import requests
from bs4 import BeautifulSoup
url = "http://www.omdbapi.com/?apikey=73a4d84d&t=Tenet"
response = requests.get(url)
content = response.content
soup = BeautifulSoup(content,"html.parser")
print(soup["Title"])
【问题讨论】:
标签: python json dictionary beautifulsoup request