自动将网页上的价格转换为不同的货币
我对自动将网页加载时给出的价格从给定货币转换为指定货币的可能方法感兴趣。理想情况下,转换还可以利用当前汇率来给出有效的价格。
例如,在我的具体情况下,我想在此 web 上转换以欧元 (€) 给出的价格网站兑换为英镑(£)。
我正在考虑使用 GreaseMonkey 脚本进行此转换,但有人可以建议其他方法吗?
谢谢,魔术安迪。
I am interested in possible methods of automatically converting the prices given when a web page is loaded from the currency given to a specified currency. Ideally, the conversion would also make use of the current exchange rate to give valid prices.
For example, in my specific case, I would like to convert the prices given in Euros (€) on this web site to Sterling (£).
I am looking at using a GreaseMonkey script for this conversion, but can anyone suggest other methods?
Thanks, MagicAndi.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
尝试 API:http://thecurrencygraph.com
它使用地理位置脚本来检测用户的国家/地区并通过该国家/地区的本国货币。然后它会使用最新的汇率将您的价格转换成他们的货币
希望这会有所帮助!
W.
Try the API: http://thecurrencygraph.com
It uses Geo Location scripts to detect the user's country and through that their native currency. It then converts your prices into their currency using the latest exchange rates
Hope this this helps!
W.
由于我涉足 AutoHotkey 这里有一个使用该脚本语言的潜在解决方案,它检索来自进行转换并解析出转换后的值的网页的页面源。这需要包含 httpQuery 库:
有显然有更彻底(和复杂)的方法来解决这个问题,但这至少以最小的努力解决了它。
Since I dabble in AutoHotkey here's a potential solution using that scripting language, it retrieves the page source from a webpage that does the conversion and parses out the converted value. This requires the httpQuery library to be included:
There are obviously more thorough (and complex) methods for solving this problem but this at least solves it with minimal effort.
快速而简单的答案是使用 Firefox 插件。有许多货币转换器可用作附加组件,但我最终使用了 Exch,因为它最适合我的需求。
The quick and easy answer is to make use of a Firefox add-on. There are a number of currency converters available as add-ons, but I ended up using Exch, as it suited my needs best.