【PythonPlanet】爬虫_菜谱
# 引用requests库import requests# 引用BeautifulSoup库from bs4 import BeautifulSoupheaders = {'user-agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36'}# 获取数据res_foods = requests.get('http: