1

I have the following script:

  def page2(self):
  """GET / (request 201)."""
     result = request201.GET('/mypage/', None,
     ( NVPair('Accept', 'image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-   shockwave-flash, */*'), 
     NVPair('Accept-Language', 'en-us'), ))

# here i want to print the html source code from the result

return result

The script was recorded using the Grinder Proxy. Thank you.

John
  • 13,197
  • 7
  • 51
  • 101
sarbo
  • 1,661
  • 6
  • 21
  • 26

1 Answers1

0

Add this line:

print result.text

See http://grinder.sourceforge.net/g3/script-javadoc/HTTPClient/HTTPResponse.html for additional detail.

Travis Bear
  • 13,039
  • 7
  • 42
  • 51
  • I tried but this method is not working for all websites. For example: result = request1.GET("http://www.accuweather.com/") when i call for result.text nothing is printed. Did I miss something? – sarbo Nov 26 '12 at 09:10