I have no idea what I'm doing.

master
q3k 2013-12-05 21:26:18 +01:00
parent c0ff3cb39a
commit 14c7f116a4
1 changed files with 1 additions and 5 deletions

View File

@ -189,11 +189,7 @@ class BREFetcher(object):
data["encoding.selectedKey"] = "iso"
export = self._post("report/submitExport.do", data)
self._gettoken(export)
dlurl = re.search(r'openPopup\("(.+)"\);', str(export)).group(1)
print "[i] Download popup URL: {}".format(dlurl)
page = dlurl.replace("/mt/", "")
dlpage = self._get(page)
fileurl = "report/downloadExport.do?command=download"
fileurl = "report/downloadExport.do?command=download&FileNumber=0"
f = self.s.post(self.BASE + fileurl, dict(FileNumber=0), stream=True)
return f.raw