From 5360328350fc96c1c65d6979cd2a58b78861ef33 Mon Sep 17 00:00:00 2001 From: Farhan Ahmed Date: Wed, 19 Jul 2023 14:28:46 +0500 Subject: [PATCH] Fixing few bugs --- GoogleAds/main.py | 6 +++--- setup.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/GoogleAds/main.py b/GoogleAds/main.py index 36aa736..a79c76a 100644 --- a/GoogleAds/main.py +++ b/GoogleAds/main.py @@ -2,7 +2,7 @@ import requests from typing import Union from bs4 import BeautifulSoup as soap -from regions import Regions +from .regions import Regions HEADERS = { 'authority': 'adstransparency.google.com', @@ -37,7 +37,7 @@ def __init__(self, region="anywhere", proxy=None): self.headers = HEADERS #proxy config self.proxy = proxy - if proxy is not None: + if proxy is not None or not proxy: self.reqs.proxies.update(proxy) self.r_check = True @@ -63,7 +63,7 @@ def refresh_session(self, proxy=None): """Refresh Session cookies""" self.reqs = requests.Session() self.get_cookies() - if proxy is not None: + if proxy is not None or not proxy: self.proxy = proxy self.reqs.proxies.update(self.proxy) diff --git a/setup.py b/setup.py index 815a3c6..93de817 100644 --- a/setup.py +++ b/setup.py @@ -6,9 +6,9 @@ author_email="jattfarhan10@gmail.com", url="https://github.com/faniAhmed/GoogleAdsTransparencyScraper", description="A scraper for getting Ads from Google Ads Transparency", - version="1.5.2", + version="1.5.3", packages=find_packages(), - download_url= 'https://github.com/faniAhmed/GoogleAdsTransparencyScraper/archive/refs/tags/v1.5.2.tar.gz', + download_url= 'https://github.com/faniAhmed/GoogleAdsTransparencyScraper/archive/refs/tags/v1.5.3.tar.gz', keywords= ['Google', 'Transparency', 'Scraper', 'API', 'Google Ads', 'Ads', 'Google Transparency', 'Google Transparency Scraper', 'Google Ads Scraper'], license='Securely Incorporation', install_requires=[