mardi 7 novembre 2017

Scraping web in Microsoft excel vba

I have created a vba in excel to read a product DKP number and add it to the end of the website URL and it is do it correctly. Example DKP-145686, I input in excel cell and it will add it to the following link: http://ift.tt/2AplttM The result is : http://ift.tt/2j8AziZ

In the second step the we look at the page http://ift.tt/2j8AziZ content to see the inventory of this product whether it is available or our out of stock. The problem is that excel can not open this website correctly since the inventory part of the website is codded by javascript and it can not be loaded by scrapt data from web also.

In fact, the problem is even when we are going to search the specific part in HTML code of the website by class or ID, the point is that since the site is not loaded correctly in the Internet Explorer since it has java script there is no out put.

Is there any way to change the browser in the vba and use google chrome instead of the old Internet Explorer which can not load the javascript at all? or is there any way around this problem to scrap the data after the page loaded completely on the web, since the javascript code needs to be run completely to see the availability of the product on the webpage.




Aucun commentaire:

Enregistrer un commentaire