1. Askar Yusupov
  2. pylibcurl
Issue #5 resolved

pylibcurl can not deal redirect

Anonymous created an issue

from pylibcurl import Curl

c = Curl('http://www.d1dt.com')

c.setopt(encoding = 'gzip,default,sdch',useragent = "Mozilla/5.0 (X11; Linux x86_64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1",referer = 'http://www.d1dt.com',followlocation = 0,maxredirs = 5,connecttimeout = 10,timeout = 15,nosignal = 1)

c.perform()

print c.getinfo('response_code') the response code is 301,so I can't get it's html code. But the url didn't redirect.I try to use urllib2 to open the url,it response code is 200,and I get the html code.

Comments (2)

  1. Log in to comment