# Win32ole IE

**URL:** <https://www.ruby-forum.com/t/win32ole-ie/197456>\
**Category:** Ruby\
**Created:** [October 14, 2010, 6:04pm UTC](https://www.ruby-forum.com/t/win32ole-ie/197456 "2010-10-14T18:04:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![okkezSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/85f322/32.png) [@okkezSS](https://www.ruby-forum.com/u/okkezSS)\
**Post date:** [October 14, 2010, 6:04pm UTC](https://www.ruby-forum.com/t/win32ole-ie/197456/1 "2010-10-14T18:04:20Z")

</div>

I am using native ruby api calls to IE without waitr to retrieve  
information from google maps.

I am trying to capture the following output which is just a simple  
string:  
[http://maps.google.com/maps/geo?q=123+main+street+ottawa+canada&output=csv](http://maps.google.com/maps/geo?q=123+main+street+ottawa+canada&output=csv)

The output is this:  
200,8,45.4106089,-75.6788888

How can I capture that information inside a variable since there are  
no HTML tags?

This dosn’t seem to work:  
geo\_code = ie.Document.All.tags(“”)

---

<div class="post-metadata">

**Author:** ![adistarmid](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f14d63/32.png) [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Post date:** [October 14, 2010, 7:42pm UTC](https://www.ruby-forum.com/t/win32ole-ie/197456/2 "2010-10-14T19:42:51Z")

</div>

Hi

I could get the code by  
ie.document.getElementsByTagName(‘pre’).item(0).innerHTML

but at this case, I recomend you to use open-uri, it’s more simple and  
fast and not depend on Windows.

ex)  
require ‘open-uri’  
csv = nil  
open(‘[http://maps.google.com/maps/geo?q=123+main+street+ottawa+canada&output=csv](http://maps.google.com/maps/geo?q=123+main+street+ottawa+canada&output=csv)’)  
do |http|  
csv = http.read  
end  
puts “geo\_code=#{csv}”

–  
arton [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![adistarmid](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f14d63/32.png) [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Post date:** [October 14, 2010, 8:07pm UTC](https://www.ruby-forum.com/t/win32ole-ie/197456/3 "2010-10-14T20:07:18Z")

</div>

Thanks for the snippet and alternative solution.
