Exemple #1
0
def get_result(url):
    try:
        return requests.get(url,
                            headers={
                                'User-Agent': random.choice(USER_AGENTS)
                            },
                            proxies=get_proxies()).text
    except requests.exceptions.SSLError as e:
        print(
            '[ERROR] Encountered an SSL Error. Try using HTTP instead of '
            'HTTPS by setting the environment variable "HOWDOI_DISABLE_SSL".\n'
        )
        raise e
Exemple #2
0
def get_result(url):
    return requests.get(url, headers={'User-Agent': random.choice(USER_AGENTS)}, proxies=get_proxies()).text
Exemple #3
0
def get_result(url):
    try:
        return requests.get(url, headers={'User-Agent': random.choice(USER_AGENTS)}, proxies=get_proxies()).text
    except requests.exceptions.SSLError as e:
        print('[ERROR] Encountered an SSL Error. Try using HTTP instead of '
              'HTTPS by setting the environment variable "HOWDOI_DISABLE_SSL".\n')
        raise e
Exemple #4
0
def get_result(url):
    try:
        return requests.get(url, headers={'User-Agent': random.choice(USER_AGENTS)}, proxies=get_proxies()).text
    except requests.exceptions.SSLError:
        print('[ERROR] Encountered an SSL Error. Try using HTTP instead of '
              'HTTPS by specifying the command line option --no-ssl')