Extracting data from website
After looking over some of the other posts other people have written, I haven't come across one that would apply to my dilemma. I would like to write a program that would extract, from a website, the sales tax lookup based on the U.S. zip code entered. The website that I chose to use also displays the city, State and county that corresponds to that zip code. I need all four in my userform (city, county, state, and sales tax). The website being used is http://www.zip2tax.com/z2t_lookup.asp? Using Google's inspect element to get the name of the tag for each element but there are other tag names with the same name and which are nested. What's the best way to approach this and how to write the code in vb2012? Thanks for the help.
Re: Extracting data from website
What about using microsoft.mshtml in the reference manager? Does anyone know anything about this? I tried to Google how to do this task and came across this website stating that I should download a Html Agility Pack. There has to be something within vb.net that should allow someone to do this task.
Re: Extracting data from website
No you don't need the Agility Pack. However it would appear that you are attempting to subvert this site in order to avoid paying the required subscription for extended use sao I'm afraid I won't be helping you any further.
Re: Extracting data from website
Sorry but I wasn't aware that it was a subscription site until after I submitted this post. So instead I would the like to use this website https://tools.usps.com/go/ZipLookupAction_input
After googling and binging how to do this I found out that what I want to do is called scrapping and its not a good practice.
Re: Extracting data from website
Quote:
After googling and binging how to do this I found out that what I want to do is called scrapping and its not a good practice.
That really depends.
If it's a site that generates a hash or something for instance, and you want to retrieve the hash through a website rather than doing it directly from the program, then it's probably not a good thing. But in other cases, you have no choice but to get the data from the website because it doesn't exist anywhere else, so I don't see how you can call that bad practice. Especially if this is not your site, and you can't integrate some kind of JSON page or an SQL database that you can interact with depending on which way you want to do things.