2011-08-19, 17:47
Hello,
This is a pretty general Python question, but relates to the streaming app I am working on.
I have a url opener defined as such:
I am trying to do a GET/POST on a url of the form "http://www.example.com/#/foo" however, the URL always truncates after the #. It prints to console fine, showing the full URL, but when intercepting the POST/GET I notice that it is truncated.
Can anyone provide insite to this issue?
(Its very hard to Google this since # = python comment!!! )
This is a pretty general Python question, but relates to the streaming app I am working on.
I have a url opener defined as such:
Code:
class BrowseBot:
def __init__(self):
cookie_handler= urllib2.HTTPCookieProcessor()
redirect_handler= urllib2.HTTPRedirectHandler()
self._opener = urllib2.build_opener(redirect_handler, cookie_handler)
def GET(self, url):
return self._opener.open(url).read()
def POST(self, url, parameters):
return self._opener.open(url, urllib.urlencode(parameters)).read()
I am trying to do a GET/POST on a url of the form "http://www.example.com/#/foo" however, the URL always truncates after the #. It prints to console fine, showing the full URL, but when intercepting the POST/GET I notice that it is truncated.
Can anyone provide insite to this issue?
(Its very hard to Google this since # = python comment!!! )