Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Juanchobanano committed Sep 7, 2023
1 parent 80b3e13 commit 4822f26
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions extra/test.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,31 @@
from search_engines import Google, Bing
import requests
from requests.auth import HTTPProxyAuth

proxy = "brd.superproxy.io:22225"
username = "brd-customer-hl_93b5fa1a-zone-data_center"
password = "ask3gh8zga95"

proxy = username = password = None
proxies = {"http": f"http://{proxy}"}
auth = HTTPProxyAuth(username, password)
session = requests.session()
session.proxies = proxies
session.auth = auth

print(session.proxies)
print(session.auth)

try:
response = session.get("https://stackoverflow.com/questions/32986228/difference-between-using-requests-get-and-requests-session-get")
print(response.status_code)
except Exception as e:
print(str(e))
print("ERROR")
pass
#proxy = username = password = None
engine = Google(proxy = proxy, username = username, password = password, language = "ES")
#engine = Google(proxy = proxy, username = username, password = password, language = "ES")

#results = engine.search("MSI GT77 Titan 12UGS-008 17.3 / Nvidia GeForce RTX 3070 Ti UHD Intel Core i9-12900HX 1.5GHz / 128GB RAM / 2TB SSD", pages = 1)
results = engine.search("Huawei Matedock 2 Blanco", pages = 1)
results = engine.search("MSI GT77 Titan 12UGS-008 17.3 / Nvidia GeForce RTX 3070 Ti UHD Intel Core i9-12900HX 1.5GHz / 128GB RAM / 2TB SSD", pages = 1)
#results = engine.search("Huawei Matedock 2 Blanco", pages = 1)
print(results.titles())

0 comments on commit 4822f26

Please sign in to comment.