大家好,我正在抓取亚马逊网站,我正在获取所有 16 个链接,但想从新生成的列表中删除 {} 部分。提供的输出
from requests_html import HTMLSession
import time
import pandas as pd
s = HTMLSession()
r = s.get("https://www.amazon.in/s?k=oneplus&page=1")
r.html.render(sleep=1)
t= []
Everything = r.html.find("div.s-include-content-margin.s-border-bottom.s-latency-cf-section")
for e in Everything:
links = e.find("a.a-link-normal.a-text-normal")[0].absolute_links
t.append(links)
print("\n",t)
Run Code Online (Sandbox Code Playgroud)
python amazon-web-services web-scraping python-3.x python-requests