writes response
(self, buf)
| 22 | HTTPRequest.__init__(self, cookies=cookies, options=options) |
| 23 | |
| 24 | def write(self, buf): |
| 25 | """ writes response """ |
| 26 | if self.limit and self.rep.tell() > self.limit or self.abort: |
| 27 | rep = self.getResponse() |
| 28 | if self.abort: |
| 29 | raise Abort() |
| 30 | f = open("response.dump", "wb") |
| 31 | f.write(rep) |
| 32 | f.close() |
| 33 | raise Exception("Loaded Url exceeded limit") |
| 34 | |
| 35 | self.rep.write(buf) |
| 36 | |
| 37 | |
| 38 | class PornhubCom(SimpleHoster): |
no test coverage detected