Data scraping from the website

Hi Experts, I wanted to scrape the data from the website I want to extract the data from the Today's Calendar section of the following columns: Date, Time, Currency, New description, high impact to the Excel spreadsheet.

Please advice me on to code this in VB.NET.

Who is Participating?
Praveen KumarConnect With a Mentor ArchitectCommented:
Exact source code you may not get, but you can search EE and google for articles on HttpWebRequest and HttpWebResponse classes. They used send requests to websites and get responses from them. Once you got website html code into your application, you have to play with it to get data as u required.

For examle here is (C# - easy to convert) function will get html string from your site.

private String PostData(string url)
            String result = "";
            String strPost = "If any Paramerets add here";
            StreamWriter myWriter = null;

            HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(url);
            objRequest.Method = "POST";
            objRequest.ContentLength = strPost.Length;
            objRequest.ContentType = "application/x-www-form-urlencoded";

                myWriter = new StreamWriter(objRequest.GetRequestStream());
            catch (Exception e)
                return e.Message;

            HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();
            using (StreamReader sr =
               new StreamReader(objResponse.GetResponseStream()))
                result = sr.ReadToEnd();

                // Close and clean up the StreamReader
            return result;
Praveen KumarArchitectCommented:
This need some homework. but if you have have enough time you can do yourself. Just study the HttpWebRequest and HttpWebRespose classes which are defined in System.Net.
There is lot of articles in internet, best of luck.
bpyeoAuthor Commented:
Any website that provides an example code for the purpose? Please let me know.
Forced accept.

EE Admin
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.