以编程方式访问亚马逊心愿单?
亚马逊最近更改了他们的 API,现在似乎无法使用这些 API 以编程方式访问我在亚马逊上的愿望清单。除了屏幕抓取之外,有人知道还有什么方法吗?也许是一些第三方服务(我不介意仅使用公共数据)?
Amazon recently changed their APIs which and it seems there's no way now to access my WishList on Amazon programmatically using these APIs. Anybody knows any way to do it besides screen-scraping? Maybe some third-party service (I don't mind working with only public data)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对于屏幕抓取,紧凑的布局样式可能会有所帮助:http://bililite.com/blog/2010/10/31/hacking-my-way-to-an-amazon-wishlist-widget/
更新
我自己在谷歌电子表格中进行了一些黑客攻击,并设法使 2 个基本实现正常工作。
使用 Google Apps 脚本:
在单元格 A1 中输入您的愿望清单 ID。将以下内容复制并粘贴到 google apps 脚本中(工具 > 脚本 > 脚本编辑器),然后运行 getWishlist 函数:
注意,我在正则表达式与标题/价格匹配时遇到了一些问题。不知道为什么,但显示了基本思想。
使用 Google 电子表格功能
在单元格 A1 中输入您的心愿单 ID。
在 A2 中键入以下函数。它将使用您的愿望清单中每个项目的 id 字符串填充该单元格及其下方的所有内容:
在 B2 中键入以下函数,这将从 id 字符串中提取 asin:
在 B3 中键入以下函数,这将获取报价列表对于 B2 中的 asin 并显示标题:
在 B4 中键入以下函数,这将获取 B2 中的 asin 的报价列表并显示所有价格:
For screen scraping, the compact layout style might be helpful: http://bililite.com/blog/2010/10/31/hacking-my-way-to-an-amazon-wishlist-widget/
Update
I did some hacking of my own in google spreadsheets and managed to get 2 basic implementations working.
Using Google Apps Scripts:
Type your wishlist ID into cell A1. Copy and paste the following into a google apps script (Tools > Scripts > Scripts Editor), and run the getWishlist function:
NB, I'm having some probs with regex matching the title / price. Not sure why, but shows the basic idea.
Using Google Spreadsheet Functions
Type your wishlist ID into cell A1.
Type the following function into A2. It will populate the cell and all below it with the id strings for each item in your wishlist:
Type the following function into B2, which will extract the asin from the id string:
Type the following function into B3, which will fetch the offer listing for the asin in B2 and display the title:
Type the following function into B4, which will fetch the offer listing for the asin in B2 and display all the prices:
一个叫 Justin Scarpetti 的人创建了一个非常简洁的“api”,它可以抓取你的愿望清单并以 json 格式返回数据。
来源:亚马逊愿望清单
A guy called Justin Scarpetti has created a really neat "api" which scrapes your wishlist and returns the data in json format.
Source: Amazon Wish Lister