html - 编辑已售商品 Ebay Scrape VBA
问题描述
寻找一种通过 excel VBA 执行此操作的两种方法之一。
1) 在 ebay 上搜索零件号并返回已售商品的数量,或者;
2) 使用直接链接执行相同的任务。
有任何想法吗?
我努力了:
Public Sub GetNumberSold() Dim html As HTMLDocument
Set html = New HTMLDocument
With CreateObject("MSXML2.XMLHTTP")
.Open "GET", "https://www.ebay.com/itm/VIRGINIA-CAVALIERS-FINAL-FOUR-National-FREAKIN-Champions-T-Shirt-Gildan/352639122861", False
.send
html.body.innerHTML = .responseText
End With
MsgBox html.querySelector(".vi-txt-underline").innerText
Debug.Print Replace$(html.querySelector(".vi-txt-underline").innerText," sold",vbNullString)
Debug.Print split(html.querySelector(".vi-txt-underline").innerText,chr$(32))(0)
End Sub
按照下面的要求启用两个对象/引用。
然后我收到以下错误:运行时“91”对象变量或未设置块变量。
解决方案
推荐阅读
- jquery-ui - 加载页面时,Jquery-Ui Datepicker 已经可见,而不是按预期点击
- ansible - Ansible:循环遍历文件全局列表
- c# - 如何根据 C# 中的属性实例化集合/类
- bash - Grep - 如何仅输出捕获组的内容
- ruby - 如何在logstash过滤器中使用redis?
- webpack - 如何从 Webpack 4 中的加载程序上下文访问编译器/编译/模块
- javascript - 使用扩展运算符使用反应挂钩更新地图函数内部的状态
- angular - mat 手风琴不适用于组件选择器
- javascript - setTimeout 调用堆栈问题
- swift - 半径角和按钮