Skip to content

Commit

Permalink
Adicionar verificação de ip
Browse files Browse the repository at this point in the history
  • Loading branch information
Winzen committed Nov 27, 2024
1 parent a3cbcee commit f4d7292
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pipelines/utils/crawler_tse_eleicoes/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from pipelines.utils.crawler_tse_eleicoes.constants import constants as tse_constants
import tempfile
from pathlib import Path
from pipelines.utils.utils import log



Expand Down Expand Up @@ -131,6 +132,9 @@ def download_extract_zip(self, url: str, chunk_size=128) -> None:
"https": self.proxy
}

proxy_test = requests.get('https://api.myip.com/', proxies=proxies, verify=False)
log(proxy_test)

r = requests.get(url, headers=request_headers, proxies=proxies, verify=False, timeout=300)

save_path = self.path_input / url.split("/")[-1]
Expand Down

0 comments on commit f4d7292

Please sign in to comment.