def __init__(self, query: str, max_item_count: int): self.http_client = HTTPClient() self.bearer_token = BEARER_TOKEN self.next_token = '' self.query = query self.max_item_count = max_item_count self.__lock = asyncio.Lock()
def demo(): # Start Example TCP socket client for message in samplelist: # see samplelist in /data_streams/samples.py SocketClient(message=message).start() # Start HTTP example client HTTPClient().start() # Start Example Random Number Stream DataStream(random_nr_config, random_nr).start()
def __init__(self, proxies): # self._username = username # self._password = password self._http_client = HTTPClient(proxies=proxies) self._user_agent = random.choice(USER_AGENTS) self.credit_ticket = None self.currentTimeMillis = None self._detail_url = None self._index_1_url = None self._index_2_url = None self._search_list_url = None pass
def get_captcha(path, group='emop'): fd = open(path, 'r') data = base64.b64encode(fd.read()) fd.close() client = HTTPClient() param = {'g': group, 'content': data} response = client.post_data("http://42.120.43.111:8925/route", param, {}) #response = client.post_data("http://127.0.0.1:8925/route", param, {}) if response: ret = json.loads(response) else: ret = {} return ret
def get_captcha(path, group='emop'): fd = open(path, 'rb') data = base64.b64encode(fd.read()) fd.close() client = HTTPClient() param = {'g': group, 'content': data} response = client.post_data("http://192.168.3.220:8000/route", param, {}) #response = client.post_data("http://127.0.0.1:8925/route", param, {}) print("the response : %s" % response) if response: ret = json.loads(response) else: ret = {} return ret
def __init__(self, proxies): self._http_client = HTTPClient(proxies=proxies) self._user_agent = random.choice(USER_AGENTS) pass
def __init__(self, userId, password): self._userId = userId self._password = password self._http_client = HTTPClient() pass
def __init__(self): self._http_client = HTTPClient() pass
def __init__(self, reader, writer, token): super().__init__(Platform.ItchIo, __version__, reader, writer, token) self.http_client = HTTPClient(self.store_credentials) self.session_cookie = None
def __init__(self, config, proxies={}): self._config = config self._http_client = HTTPClient(proxies=proxies) self._user_agent = random.choice(self._config.user_agents) pass
def __init__(self, username, password): self._username = username self._password = password self._http_client = HTTPClient() pass
def __init__(self, proxies): # self._username = username # self._password = password self._http_client = HTTPClient(proxies=proxies) pass
def __init__(self): # self._username = username # self._password = password self._http_client = HTTPClient() pass
def ready(self): self.http = HTTPClient() self.http.set_proxy(settings.PROXY) self.logger = logging.getLogger("Spider") self._load_actions()