Get google results in VC++ and process the text result

Discussion in 'Mixed Languages' started by BlackStar Vvek, Jul 19, 2013.

  1. BlackStar Vvek

    BlackStar Vvek MDL Novice

    May 23, 2013
    5
    0
    0
    Atleast I found how to get search result in webbrowser tool in VC++ form.

    textbox.Text = e.Result.Text;
    string a, b, d;
    a = "google.com/search?output=";
    b = "&q=";
    d = a + textbox.Text + " meaning" + b + textbox.Text + " meaning";
    webbrowser1.Navigate(d);

    Now I want to store or process searched results, that loaded in "webbrowser1". I tried of converting it into a html file and processing.. But no use! can anyone help?
     
  2. PAYMYRENT

    PAYMYRENT MDL Developer

    Jul 28, 2009
    1,460
    420
    60
    use the webbrowser1.document and parse the html with the options you see its not to hard if i had a ready example i would post but a google search should be very helpful here
     
  3. BlackStar Vvek

    BlackStar Vvek MDL Novice

    May 23, 2013
    5
    0
    0
    Ya I tried already. but I need the results as "text" or atleast XML. How to process a HTML file?
     
  4. BlackStar Vvek

    BlackStar Vvek MDL Novice

    May 23, 2013
    5
    0
    0
    I also tried for XML API reference. But I got 404 in <ERROR> tag!
     
  5. PAYMYRENT

    PAYMYRENT MDL Developer

    Jul 28, 2009
    1,460
    420
    60
    if i remember you should be able to use the browser.document class and parse using getelementsbytagname - dont quote me on that but it should be something similar the tag name for urls is href and you should be able to pull the links - if thats what you want - from that. - ill whip something up real quick to refresh myself also lol