Skip to content

Commit af9c453

Browse files
committed
All Done.
1 parent 4e53ad4 commit af9c453

3 files changed

Lines changed: 39 additions & 35 deletions

File tree

captchas/captcha.png

22.6 KB
Loading

check.py

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import configparser, time, csv
1515

1616

17+
1718
### ______________________________ INIT _____________________________________
1819

1920
config = configparser.ConfigParser()
@@ -45,9 +46,8 @@ def chrome_proxy(user: str, password: str, endpoint: str) -> dict:
4546
return wire_options
4647

4748
#main function
48-
def execute_driver():
49-
options = webdriver.ChromeOptions()
50-
options.headless = True
49+
def execute_driver(total_num):
50+
start_time = time.time()
5151
proxies = chrome_proxy(USERNAME, PASSWORD, ENDPOINT)
5252

5353
#Defining Chrome Options
@@ -59,23 +59,26 @@ def execute_driver():
5959

6060
# Opening it headless
6161
chrome_options.add_argument(f'--headless')
62-
driver = webdriver.Chrome(options=chrome_options, seleniumwire_options=proxies)
63-
# driver = webdriver.Chrome(options=chrome_options)
62+
chrome_options.add_argument("--log-level=3")
63+
print("[+] Opening Chrome ")
64+
# driver = webdriver.Chrome(options=chrome_options, seleniumwire_options=proxies)
65+
driver = webdriver.Chrome(options=chrome_options)
6466
driver.maximize_window()
6567
try:
6668
# MAIN URL
6769
# url = 'https://dfentertainment.queue-it.net/softblock/?c=dfentertainment&e=redhotconcertweek&cid=es-CL&rticr=0'
6870
url = 'https://dfentertainment.queue-it.net/?c=dfentertainment&e=lollalup240943&cid=es-CL'
6971
driver.get(url)
72+
print('[+] Output will shown below. ')
7073
flag = True
7174
while flag:
7275
time.sleep(2)
7376
wait = WebDriverWait(driver, 5)
7477
captcha_image = wait.until(EC.presence_of_element_located((By.XPATH,"//img[@class='captcha-code']")))
7578
captcha_image.screenshot('captchas/captcha.png')
76-
driver.find_element(By.TAG_NAME,'body').send_keys(Keys.ARROW_DOWN)
77-
driver.find_element(By.TAG_NAME,'body').send_keys(Keys.ARROW_DOWN)
78-
time.sleep(0.2)
79+
# driver.find_element(By.TAG_NAME,'body').send_keys(Keys.ARROW_DOWN)
80+
# driver.find_element(By.TAG_NAME,'body').send_keys(Keys.ARROW_DOWN)
81+
# time.sleep(0.2)
7982
try:
8083
result = solver.normal('captchas/captcha.png')
8184
except Exception as ex:
@@ -93,27 +96,39 @@ def execute_driver():
9396
element_exist = True
9497
try:
9598
driver.find_element(By.XPATH,"//div[@class='hidden']")
99+
print("[+] Captcha Failed!")
96100
element_exist = True
97101
except:
98102
element_exist = False
99103
if not element_exist:
104+
print("[+] Captcha Bypassed!")
100105
wait.until(EC.presence_of_element_located((By.ID,"MainPart_divProgressbar")))
101-
time.sleep(4)
106+
print("[+] Waiting for the loader")
102107
wait = WebDriverWait(driver, 25)
103-
time2 = driver.find_element(By.ID,"MainPart_lbWhichIsIn").text
104-
queue_identificator = driver.find_element(By.ID,"hlLinkToQueueTicket2").text
105108
time.sleep(1)
106109
flag2 = True
110+
time2 = driver.find_element(By.ID,"MainPart_lbWhichIsIn").text
111+
if time2 == "":
112+
time2 = "menos de un minuto"
107113
while flag2:
108114
try:
109-
wait.until(EC.presence_of_element_located((By.ID,"MainPart_divProgressbar")))
110-
time.sleep(1)
115+
driver.find_element(By.ID,"MainPart_divProgressbar")
116+
queue_identificator = driver.find_element(By.ID,"hlLinkToQueueTicket2").text
117+
time.sleep(0.1)
111118
except:
112119
break
113-
time.sleep(0.9)
120+
# time.sleep(0.9)
114121
current_url = driver.current_url
122+
stop_time = time.time()
123+
elapsed_time_seconds = stop_time - start_time
124+
125+
elapsed_time_minutes = elapsed_time_seconds / 60
126+
127+
print(f"[+] Total time: {elapsed_time_seconds:.2f} seconds ({elapsed_time_minutes:.2f} minutes)")
115128
# queue_identificator = current_url.split('&')[0].split('=')[1]
116-
print("Token URL : ", current_url, " Estimated Time : ", time2, ' Queue Identificator : ', queue_identificator)
129+
print(f"[+] Get {total_num} Link.")
130+
print("[+] Token URL : ", current_url, "| Estimated Time : ", time2, '| Queue Identificator : ', queue_identificator)
131+
print("[+] -------------------------------------------------------------------------------------")
117132
with open('output/output.csv', 'a', encoding="utf-8", newline='') as f:
118133
writer = csv.writer(f)
119134
writer.writerow([current_url, queue_identificator, time2])
@@ -127,11 +142,12 @@ def execute_driver():
127142
# _____________________________ RUNING IT _______________________________
128143

129144
if __name__ == "__main__":
130-
print("________ HELLO ! Hope you are well. ______________________")
131-
run = int(input("[+] ________________ How many times you want to run the bot : ____________"))
145+
print("[+] HELLO ! Hope you are well.")
146+
run = int(input("[+] How many times you want to run the bot : "))
147+
total_num = 0
132148
for i in range(run):
133-
execute_driver()
134-
149+
total_num += 1
150+
execute_driver(total_num)
135151
print('[-] ____________________________ THANK YOU ________________________________')
136152
print('[-] ____________________________ BYE ________________________________')
137153

output/output.csv

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,4 @@
1-
URL,Identifacador de fila,última actualización
2-
3-
https://www.allaccess.com.ar/event/lollapalooza-2024,8b3b16b2-890a-4af0-894e-c5f0c824fc9d,menos de un minuto
4-
https://www.allaccess.com.ar/event/lollapalooza-2024,9142c990-1386-4622-83c6-9e09b83e048f,menos de un minuto
5-
https://www.allaccess.com.ar/event/lollapalooza-2024,1dd33e34-c060-44f0-9a00-119bb50ecb6d,menos de un minuto
6-
https://www.allaccess.com.ar/event/lollapalooza-2024,911432df-e9da-42ed-a6ce-6bb72a1978e0,menos de un minuto
7-
https://www.allaccess.com.ar/event/lollapalooza-2024,dd8277d0-e66e-4f7b-ac85-2f703fc1b4be,menos de un minuto
8-
https://www.allaccess.com.ar/event/lollapalooza-2024,7cec59dc-f40b-4166-ba41-04cfd6680565,menos de un minuto
9-
https://www.allaccess.com.ar/event/lollapalooza-2024,180134bd-0223-4eeb-b91f-f16707d3b774,menos de un minuto
10-
11-
https://www.allaccess.com.ar/event/lollapalooza-2024,,
12-
https://www.allaccess.com.ar/event/lollapalooza-2024,,
13-
https://www.allaccess.com.ar/event/lollapalooza-2024,943c0dfb-0cb7-4e91-929e-1d8677a8a279,menos de un minuto
14-
https://www.allaccess.com.ar/event/lollapalooza-2024,,
15-
https://www.allaccess.com.ar/event/lollapalooza-2024,fa75455f-5b7b-4b09-ad2a-368cdf5d1559,menos de un minuto
16-
https://www.allaccess.com.ar/event/lollapalooza-2024,34c80091-f466-4979-b6a2-fe0dd3c36642,menos de un minuto
1+
URL,Identifacador de fila,última actualización
2+
https://www.allaccess.com.ar/event/lollapalooza-2024?qitq=c0833077-df32-4d8b-91b0-02707a823406&qitp=2ce0a7c4-3592-4cd9-a385-f5302b01ff68&qitts=1699494520&qitc=dfentertainment&qite=lollalup240943&qitrt=Queue&qith=4d04877f839e758edb6f3b203a5e4cfc,c0833077-df32-4d8b-91b0-02707a823406,menos de un minuto
3+
https://www.allaccess.com.ar/event/lollapalooza-2024?qitq=30f425c7-637e-4f4a-ba63-a7c7064c990d&qitp=87e00454-4d9d-46fd-83e1-b63c510df4bc&qitts=1699494601&qitc=dfentertainment&qite=lollalup240943&qitrt=Queue&qith=dd3cd0172ad2618355867cf70ef8fced,30f425c7-637e-4f4a-ba63-a7c7064c990d,menos de un minuto
4+
https://www.allaccess.com.ar/event/lollapalooza-2024?qitq=a55aa772-9753-4923-be14-e6bcdf7800df&qitp=b1e0a814-5194-4fad-83a0-d1332702c1f0&qitts=1699494673&qitc=dfentertainment&qite=lollalup240943&qitrt=Queue&qith=55c9870c47671811ffba87ef597521ba,a55aa772-9753-4923-be14-e6bcdf7800df,menos de un minuto

0 commit comments

Comments
 (0)