网页抓取材料图片

时间:2019-02-12 07:28:31

标签: python-3.x web-scraping airtable

我想在this website上刮擦fabric_container的所有图像及其属性,并将它们作为附件放入Airtable数据库中。

from bs4 import BeautifulSoup as soup
from urllib.request import urlopen as uReq
from airtable import Airtable
my_url = 'https://www.warwick.com.au/products/SAC219501'
uClient = uReq(my_url)
page_html = uClient.read()
uClient.close()
page_soup = soup(page_html, "html.parser")
containers = page_soup.findAll("div",{"class" : "container"})
airtable.batch_insert(records)
print(containers[3])

0 个答案:

没有答案