Commits

Pavel Zhukov committed 559f2f2

fixes in post request
add post and get parametrs to follow_link

  • Participants
  • Parent commits e02421e

Comments (0)

Files changed (1)

         logging.debug('url: %s' % target)
         logging.debug('headers %s' % self.headers)
         if post:
-            self.response = self.browser.open(target, post)
+            self.response = self.browser.open(target, urllib.urlencode(post))
         else:
             self.response = self.browser.open(target)
         self.headers['Referer'] = target
         #pdb.set_trace()
         return self.response
     
-    def follow_link(self, url):
-        self.response = self.open(url, referer=self.headers['Referer'])
+    def follow_link(self, url, post=None, get=None):
+        self.response = self.open(url, post=post, get=get, referer=self.headers['Referer'])
         return self.response
 
     def post_data(self, url, post):