from bs4 import BeautifulSoup import requests import json url = "http://www.xinfadi.com.cn/getCat.html" resp = requests.get(url) print(resp.text) content_list = resp.json() for content in content_list: prodName_name = content['prodName'] place_1 = content['place'] print(f'《{prodName_name}》, 产地:{place_1}')
提交后出现