Let me explain: I want to make a currency converter form that uses online rates so that it's up to date. I plan to use Google, which has a currency converting function built in - type in:
[Any currency symbol][Any numeric amount] + in + [Any currency symbol]
I know how to format the URLs I will be searching for, and which class the span (whose text) I want is in, I simply just don't know how to programmatically take the result out and use it in my form.
Here's the applicable HTML code from a "£1 in $" conversion:
<div class="vk_ans vk_bk curtgt" style="padding-bottom: 4px">
<span style="word-break:break-all">1.68</span>
<span>US Dollar</span></div>
The class is called:
vk_ans vk_bk curtgt
The span text is the first one in the class (the one that contains "1.68")
BTW, I completely comprehend that there are easier-to-use API websites for this purpose, but I want to use Google because:
- It will always be up
- It's a good chance for me to learn how to grab a specific part a webpage.