(self)
| 435 | return self.next() |
| 436 | |
| 437 | def next(self): |
| 438 | try: |
| 439 | line = next(conf.stdinPipe) |
| 440 | except (IOError, OSError, TypeError, UnicodeDecodeError): |
| 441 | line = None |
| 442 | |
| 443 | if line: |
| 444 | match = re.search(r"\b(https?://[^\s'\"]+|[\w.]+\.\w{2,3}[/\w+]*\?[^\s'\"]+)", line, re.I) |
| 445 | if match: |
| 446 | return (match.group(0), conf.method, conf.data, conf.cookie, None) |
| 447 | elif self.__rest: |
| 448 | return self.__rest.pop() |
| 449 | |
| 450 | raise StopIteration() |
| 451 | |
| 452 | def add(self, elem): |
| 453 | self.__rest.add(elem) |