有一个python解析器(我不会扔掉完整的代码),你需要从卡片中获取产品描述,但我不知道怎么做
from bs4 import BeautifulSoup as bs
import requests
import lxml
url = 'https://www.specodegda.ru/product/kostyum-professional-2-genesis-genezis-seryy-hakitbejevyygorchichnyy/'
request = requests.get(url)
soup = bs(request.text, 'lxml')
discription = soup.find('div', class_ = 'product-info')
discriptions = discription.find_all('p')
for discription in discriptions:
print(discription.text)
1 个回答