예제 #1
0
 def __init__(self, config: SectionProxy) -> None:
     thor.events.EventEmitter.__init__(self)
     self.config = config
     self.notes = []  # type: List[Note]
     self.transfer_in = 0
     self.transfer_out = 0
     self.request = HttpRequest(self.ignore_note)  # type: HttpRequest
     self.nonfinal_responses = []  # type: List[HttpResponse]
     self.response = HttpResponse(self.add_note)  # type: HttpResponse
     self.exchange = None  # type: thor.http.ClientExchange
     self.fetch_started = False
     self.fetch_done = False
예제 #2
0
파일: fetch.py 프로젝트: jakub-g/redbot
 def __init__(self) -> None:
     thor.events.EventEmitter.__init__(self)
     self.notes = [] # type: List[Note]
     self.transfer_in = 0
     self.transfer_out = 0
     self.request = HttpRequest(self.ignore_note)  # type: HttpRequest
     self.nonfinal_responses = []                  # type: List[HttpResponse]
     self.response = HttpResponse(self.add_note)   # type: HttpResponse
     self.exchange = None                          # type: thor.http.ClientExchange
     self.follow_robots_txt = True # Should we pay attention to robots file?
     self.fetch_started = False
     self.fetch_done = False