Tricky Excel VBA IE automation question

Don_Mosquito

New Member
Joined
Aug 18, 2015
Messages
6
Hello everybody,

I have been spending the major part of my evening on researching a solution together with major try and error... but I am getting nowhere...

I have the following source code from a page (iconosquare.com), but the page seems to have a lot of javascript, although I can not see that in the HTML inspect on Chrome...
HTML:
<div class="image-wrapper">
        <input type="hidden" value="https://scontent.cdninstagram.com/t51.2885-15/s640x640/sh0.08/e35/12826269_473658709508624_652261004_n.jpg?ig_cache_key=MTIxMDMzMjI4NzU1OTIwNTMzMg%3D%3D.2.l" class="standard_resolution_source">
        <input type="hidden" value="1458502873" class="created_source">
        <a href="#/detail/1210332287559205332_288072495" class="lienPhotoGrid">
	<img src="https://scontent.cdninstagram.com/t51.2885-15/s150x150/e35/c148.0.784.784/12599512_1575861196037377_1980253214_n.jpg?ig_cache_key=MTIxMDMzMjI4NzU1OTIwNTMzMg%3D%3D.2.c">
	</a>
</div>
What I want to do is extract the URL (most important Url2 the thumbnail)
Url1:https://scontent.cdninstagram.com/t.../e35/12826269_473658709508624_652261004_n.jpg
Url2:https://scontent.cdninstagram.com/t...84/12599512_1575861196037377_1980253214_n.jpg

I tried:
1) MsgBox .getElementsByClassName("image-wrapper")(0).all
Which gives me "[object HTMLInputElement]" as message box

2)MsgBox .getElementsByClassName("image-wrapper")(0).getElementsByTag("a")
Which gives me "Object doesn't support this property or method"

As you see I am a little out of ideas here.... anyone who could give me a hand?
Appreciate it!
 

Some videos you may like

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Don_Mosquito

New Member
Joined
Aug 18, 2015
Messages
6
Ok... found it after even more search... sorry to bother

Pic_source_1 = .getElementsByClassName("image-wrapper")(0).getElementsByTagName("IMG")(0).src
 

Watch MrExcel Video

Forum statistics

Threads
1,123,514
Messages
5,602,086
Members
414,501
Latest member
mdhaumyu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top