私はいくつかのデータをウェブサイトから削り取ろうとしています。これはhtml形式です。私は"No description for 632930413867".
ウェブスクラップ用の美しいものが動作していませんか?
HTMLコード語をこすりしたい:このHTMLから
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
<table class="table product_info_table">
<tbody>
<tr>
<td>GS1 Address</td>
<td>R.R. 1, Box 2, Malmo, NE 68040</td>
</tr>
<tr>
<td>Description</td>
<td>
<div id="read_desc">
No description for 632930413867
</div>
</td>
</tr>
</tbody>
</table>
</div>
や画像SRC
<div class="centered_image header_image">
<img src="https://images-na.ssl-images-amazon.com/images/I/416EuOE5kIL._SL160_.jpg" title="UPC 632930413867" alt="UPC 632930413867">
ので、私は、このコード
Baseurl = "https://www.buycott.com/upc/632930413867"
uClient = ''
while uClient == '':
try:
uClient = requests.get(Baseurl)
print("Relax we are getting the data...")
except:
print("Connection refused by the server..")
print("Let me sleep for 7 seconds")
time.sleep(7)
print("Was a nice sleep, now let me continue...")
continue
page_html = uClient.content
uClient.close()
page_soup = soup(page_html, "html.parser")
Productcontainer = page_soup.find_all("div", {"class": "row"})
link = page_soup.find(itemprop="image")
print(Productcontainer)
for item in Productcontainer:
print(link)
productdescription = Productcontainer.find("div", {"class": "product_info_table"})
print(productdescription)
を使用します
このコードを実行すると、データは表示されません。どのように記述とimg srcを得ることができますか?