简体   繁体   中英

java - How to use google finance currency converter api?

i wanna know how to use "Google finance Converter" in android. Here is the url = https://www.google.com/finance/converter?a=1&from=USD&to=EGP&meta=ei%3DoBtUWanyG4rDU-6ygbAK i can write the amount, from, to. but i can't get the result because it's html, So how to get it?

Thanks

This may not be real useful but you can get result

First thing, you need country code from google finance.

Then web request to url using:

https://www.google.com/finance/converter?a=1&from=AED&to=ZWL

Here AED is from country code and ZWL is to country code.

Then you can parse the html to get:

<div id=currency_converter_result>1 AED = <span class=bld>87.7634 ZWL</span>
<input type=submit value="Convert">
</div>

I don't know java but sure there will be elegant web request and html parser.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM