Skip to content

Commit

Permalink
open rb
Browse files Browse the repository at this point in the history
  • Loading branch information
chliny committed Oct 5, 2013
1 parent 496aca9 commit e6c81db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xfdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,9 +362,9 @@ def __pushtor(self,url):
urlv1 = "http://lixian.qq.com/handler/bt_handler.php?cmd=readinfo"
#data1,header1 = multipart_encode({"myfile":open(url)})
#ireq = request.Request("http://lixian.qq.com/handler/bt_handler.php?cmd=readinfo",data1,header1)
ireq = requests.post(urlv1,files={"myfile":open(url)})
ireq = requests.post(urlv1,files={"myfile":open(url,"rb")})
#torinfo = self.__request(ireq.text).encode("utf8").strip()
torinfo = ireq.text.encode("utf8").strip()
torinfo = ireq.text
torinfo = "{" + "{".join(torinfo.split("{")[1:])

torinfo = json.JSONDecoder().decode(torinfo)
Expand Down

0 comments on commit e6c81db

Please # to comment.