Commits

Gregory Petukhov committed 29dc6a1

Fix multiple small issues

  • Participants
  • Parent commits 9df521a

Comments (0)

Files changed (2)

File grab/transport/curl.py

         else:
             # Turn on cookies engine anyway
             # To correctly support cookies in 302-redirects
-            self.curl.setopt(pycurl.COOKIELIST, '')
+            self.curl.setopt(pycurl.COOKIEFILE, '')
 
         if self.config['referer']:
             self.curl.setopt(pycurl.REFERER, str(self.config['referer']))

File tests/test_base_interface.py

 
     def test_xml_with_declaration(self):
         RESPONSE['get'] = '<?xml version="1.0" encoding="UTF-8"?><root><foo>foo</foo></root>'
-        g = Grab()
+        g = Grab(strip_xml_declaration=True)
         g.go(BASE_URL)
         self.assertTrue(g.xpath('//foo').text == 'foo')