我正在做一个小机器人,它应该提供来自网站(ebay)的信息,并使用splinter和python放入一个列表中。我的第一行代码:
from splinter import Browser
with Browser() as browser:
url = "http://www.ebay.com"
browser.visit(url)
browser.fill('_nkw', 'levis')
button = browser.find_by_id('gh-btn')
button.click()
例如:[“Levi Strauss&;Co.513 Slim Straight Jean Ivory男式SZ”,12.99,0],[“Levi 501牛仔裤男式原版Levi Strauss牛仔直筒”,71.44,“Now”],[“Levis 501纽扣飞边牛仔裤收缩以适合多种尺寸”,[$29.99,$39.99]]
这不是一个完美的答案,但它应该起作用。 首先安装这两个模块 requests和BS4:
这是我得到的结果
我同意@Aki003,类似这样的说法
你可以在网页上搜寻任何其他元素。查看beautifulsoup文档。你知道吗
相关问题 更多 >
编程相关推荐