login about faq

I'm trying scrape google results useing http object in VBScript.

here is the code:

set http = CreateObject("Chilkat_9_5_0.Http")
success = http.UnlockComponent("xxxx.my.key.goes.here.xxx")

deleteFile curpath & "page.html"
deleteFile curpath & "httpSessionLog.txt"
deleteFile curpath & "urls.csv"

'http.FollowRedirects = 1
http.ProxyDomain = "xxx.xxx.xxx.xxx"    
http.ProxyPort = "xxxx"
http.MimicFireFox = "1"
'http.SessionLogFilename = curpath & "httpSessionLog.txt"
http.CookieDir = "memory"
http.SaveCookies = 1
http.SendCookies = 1

url = "https://www.google.com/webhp?#gl=us&hl=en&q=what+is+my+ip+address"
html = http.QuickGetStr(url)

I know google does redirects as well drops some cookies, but can't figure out how to get actual results. I keep geting initial google page with search box and no results.

Please help

asked May 12 at 11:48

yuribrsk's gravatar image

yuribrsk
133


Maybe try with urlEncode?

link

answered May 13 at 04:33

RootTag's gravatar image

RootTag
35121623

RootTag it want do much difference, if you copy and paste the url in your browser this will load the results properly. this is actually the right way to replace spaces with pluses

link

answered May 13 at 10:14

yuribrsk's gravatar image

yuribrsk
133

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×186
×9

Asked: May 12 at 11:48

Seen: 340 times

Last updated: May 13 at 10:14

powered by OSQA