Initial commit: MSH System\n\n- msh_single_uniapp: Vue 2 + UniApp 前端(微信小程序/H5/App/支付宝小程序)\n- msh_crmeb_22: Spring Boot 2.2 后端(C端API/管理端/业务逻辑)\n- models-integration: AI服务集成(Coze/KieAI/腾讯ASR)\n- docs: 产品文档与设计稿
This commit is contained in:
16
msh_crmeb_22/scraper/analyze_recipe_detail.py
Normal file
16
msh_crmeb_22/scraper/analyze_recipe_detail.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import requests
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
url = "http://www.ishen365.com/index.php/article/18/show/28" # 黑木耳炒山药
|
||||
headers = {
|
||||
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36'
|
||||
}
|
||||
|
||||
try:
|
||||
response = requests.get(url, headers=headers)
|
||||
response.encoding = 'utf-8'
|
||||
with open("scraper/source_recipe_detail.html", "w", encoding="utf-8") as f:
|
||||
f.write(response.text)
|
||||
print("Saved recipe detail to scraper/source_recipe_detail.html")
|
||||
except Exception as e:
|
||||
print(f"Error: {e}")
|
||||
Reference in New Issue
Block a user