forked from KlevGG/TrackerScreenshot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscreenshots.py
849 lines (640 loc) · 27.4 KB
/
screenshots.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
# Required Libraries - You can change the browser driver if you would like to. More details on GitHub.
from seleniumbase import Driver, SB # type: ignore
from selenium.webdriver.common.by import By
from Screenshot import Screenshot # type: ignore
import datetime
import configparser
# Read config file
config = configparser.ConfigParser(interpolation=None)
config.read("config.ini")
if "browser" not in config["settings"]:
config["settings"]["browser"] = "chrome"
browser = config["settings"]["browser"]
# Start the driver
if browser == "brave" or browser == "opera":
# If the binary_location is not set in the config file, warn the user
if (
"binary_location" not in config["settings"]
or config["settings"]["binary_location"] == ""
):
print(
"Please set the binary_location in the config file for Brave or Opera browser."
)
exit()
driver = Driver(
uc=True, browser="chrome", binary_location=config["settings"]["binary_location"]
)
else:
driver = Driver(uc=True, browser=browser)
driver.implicitly_wait(6)
ob = Screenshot.Screenshot()
def hide_notification(driver=driver):
try:
driver.execute_script(
"document.querySelector('#noty_bottomRight_layout_container').style.display = 'none';"
)
except: # noqa: E722
pass
def take_screenshot(tracker_name, driver=driver, is_load_at_runtime=False):
hide_notification(driver)
date_string = datetime.datetime.now().strftime("%Y_%m_%d_%H_%M_%S")
image_name = tracker_name + "_" + date_string + ".png"
if config["settings"].get("full_page_screenshot", "false") == "true":
ob.full_screenshot(
driver,
save_path="screenshots",
image_name=image_name,
is_load_at_runtime=is_load_at_runtime,
)
else:
driver.save_screenshot("screenshots/" + image_name)
if "ATH" in config["wanted-trackers"]["trackers"]:
print("Entering Aither.")
# Get the details from the config file
username = config["aither"]["username"]
password = config["aither"]["password"]
profile_url = config["aither"]["profile_url"]
driver.get(profile_url)
# Navigation - DO NOT CHANGE
username_field = driver.find_element(By.NAME, "username")
password_field = driver.find_element(By.NAME, "password")
# Send username and password
username_field.send_keys(username)
password_field.send_keys(password)
# Login and save screenshot
driver.find_element(By.CLASS_NAME, "auth-form__primary-button").click()
take_screenshot("Aither")
print("Aither Screenshoted")
if "RF" in config["wanted-trackers"]["trackers"]:
print("Entering Reelflix.")
# Get the details from the config file
username = config["reelflix"]["username"]
password = config["reelflix"]["password"]
profile_url = config["reelflix"]["profile_url"]
driver.get(profile_url)
# Navigation
username_field = driver.find_element(By.NAME, "username")
password_field = driver.find_element(By.NAME, "password")
# Send username and password
username_field.send_keys(username)
password_field.send_keys(password)
# Login and save screenshot
driver.find_element(By.ID, "login-button").click()
take_screenshot("RF")
print("Reelflix Screenshoted")
if "LST" in config["wanted-trackers"]["trackers"]:
print("Entering LST.")
username = config["lst"]["username"]
password = config["lst"]["password"]
profile_url = config["lst"]["profile_url"]
driver.get(profile_url)
# Navigation
username_field = driver.find_element(By.NAME, "username")
password_field = driver.find_element(By.NAME, "password")
# Send username and password
username_field.send_keys(username)
password_field.send_keys(password)
# Login and save screenshot
driver.find_element(By.ID, "login-button").click()
take_screenshot("LST")
print("LST Screenshoted")
if "BLU" in config["wanted-trackers"]["trackers"]:
print("Entering BLU.")
username = config["blutopia"]["username"]
password = config["blutopia"]["password"]
profile_url = config["blutopia"]["profile_url"]
driver.get(profile_url)
# Navigation
username_field = driver.find_element(By.NAME, "username")
password_field = driver.find_element(By.NAME, "password")
# Send username and password
username_field.send_keys(username)
password_field.send_keys(password)
# Login and save screenshot
driver.find_element(By.CLASS_NAME, "auth-form__primary-button").click()
# 2FA is enabled, ask for the code
if driver.find_elements(By.ID, "code"):
code = input("Please enter the 2FA code: ")
code_field = driver.find_element(By.ID, "code")
code_field.send_keys(code)
take_screenshot("BLU")
print("Blu Screenshoted")
if "HUNO" in config["wanted-trackers"]["trackers"]:
print("Entering HUNO.")
username = config["huno"]["username"]
password = config["huno"]["password"]
profile_url = config["huno"]["profile_url"]
skip = False
driver.get(profile_url)
if driver.find_elements(By.ID, "challenge-running"):
print(
"Please solve the challenge and press enter to continue or type 'n' and press enter to skip."
)
response = input()
if response == "n":
skip = True
if not skip:
# Navigation
username_field = driver.find_element(By.NAME, "username")
password_field = driver.find_element(By.NAME, "password")
# Send username and password
username_field.send_keys(username)
password_field.send_keys(password)
# Login and save screenshot
driver.find_element(By.ID, "login-button").click()
# 2FA is enabled, ask for the code
if driver.find_elements(By.ID, "v_input"):
code = input("Please enter the 2FA code: ")
code_field = driver.find_element(By.ID, "v_input")
code_field.send_keys(code)
driver.find_element(By.ID, "submit_verification").click()
# is_load_at_runtime is set to ensure the full page screenshot is taken correctly
if config["settings"].get("full_page_screenshot", "false") == "true":
take_screenshot("HUNO", is_load_at_runtime=True)
else:
take_screenshot("HUNO")
print("HUNO Screenshoted")
if "SP" in config["wanted-trackers"]["trackers"]:
print("Entering Speedapp.")
username = config["speedapp"]["username"]
password = config["speedapp"]["password"]
profile_url = config["speedapp"]["profile_url"]
driver.get(profile_url)
# Navigation - Login
username_field = driver.find_element(By.NAME, "username")
password_field = driver.find_element(By.NAME, "password")
# Send username and password
username_field.send_keys(username)
password_field.send_keys(password)
# Login and screenshot
driver.find_element(By.TAG_NAME, "button").click()
take_screenshot("SP")
print("Speedapp Screenshoted")
if "FL" in config["wanted-trackers"]["trackers"]:
print("Entering Filelist.")
username = config["filelist"]["username"]
password = config["filelist"]["password"]
profile_url = config["filelist"]["profile_url"]
driver.get(profile_url)
# Navigation - Login
username_field = driver.find_element(By.NAME, "username")
password_field = driver.find_element(By.NAME, "password")
# Send username and password
username_field.send_keys(username)
password_field.send_keys(password)
# Login and screenshot
driver.find_element(By.CLASS_NAME, "btn").click()
take_screenshot("FL")
print("Filelist Screenshoted")
if "GPW" in config["wanted-trackers"]["trackers"]:
print("Entering GreatPosterWall.")
username = config["greatposterwall"]["username"]
password = config["greatposterwall"]["password"]
profile_url = config["greatposterwall"]["profile_url"]
driver.get(profile_url)
# Navigation - Login
username_field = driver.find_element(By.NAME, "username")
password_field = driver.find_element(By.NAME, "password")
# Send username and password
username_field.send_keys(username)
password_field.send_keys(password)
# Login and save screenshot
driver.find_element(By.CLASS_NAME, "Button").click()
take_screenshot("GPW")
print("GPW Screenshoted")
###THE FOLLOWING ARE TESTED BY THE COMMUNITY###
if "JME" in config["wanted-trackers"]["trackers"]:
print("Entering JME.")
username = config["jme"]["username"]
password = config["jme"]["password"]
profile_url = config["jme"]["profile_url"]
driver.get(
"https://jme-reunit3d.de/login"
) # DO NOT CHANGE THIS, JME requires an extra step for login
# Navigation - DO NOT CHANGE
username_field = driver.find_element(By.NAME, "username")
password_field = driver.find_element(By.NAME, "password")
# Send username and password
username_field.send_keys(username)
password_field.send_keys(password)
# Login and save screenshot
driver.find_element(By.ID, "login-button").click()
driver.get(profile_url)
take_screenshot("JME")
print("JME-REUNIT3D Screenshoted")
if "ANT" in config["wanted-trackers"]["trackers"]:
print("Entering AnimeTorrents.")
username = config["animetorrents"]["username"]
password = config["animetorrents"]["password"]
profile_url = config["animetorrents"]["profile_url"]
driver.get("https://animetorrents.me/login.php") # DO NOT CHANGE
# Navigation - Login
username_field = driver.find_element(By.NAME, "username")
password_field = driver.find_element(By.NAME, "password")
# Send username and password
username_field.send_keys(username)
password_field.send_keys(password)
# Login
driver.find_element(By.ID, "login-element-6").click()
# Load profile and screenshot
driver.get(profile_url)
take_screenshot("ANT")
print("ANT Screenshoted")
if "RED" in config["wanted-trackers"]["trackers"]:
print("Entering Redacted.")
username = config["redacted"]["username"]
password = config["redacted"]["password"]
profile_url = config["redacted"]["profile_url"]
driver.get(
"https://redacted.sh/login.php"
) # Keep the link as it is, DO NOT CHANGE.
# Navigation - Login
username_field = driver.find_element(By.NAME, "username")
password_field = driver.find_element(By.NAME, "password")
twofa_field = driver.find_element(By.NAME, "qrcode_confirm")
# Send username and password
username_field.send_keys(username)
password_field.send_keys(password)
# 2FA, ask for the code
code = input(
"Please enter the 2FA code: (If you don't have 2FA, just press enter.) "
)
twofa_field.send_keys(code)
# Login
driver.find_element(By.CLASS_NAME, "submit").click()
# Load profile and screenshot
driver.get(profile_url)
take_screenshot("RED")
print("RED Screenshoted")
if "STC" in config["wanted-trackers"]["trackers"]:
print("Entering SkipTheCommericals.")
username = config["skipthecommercials"]["username"]
password = config["skipthecommercials"]["password"]
profile_url = config["skipthecommercials"]["profile_url"]
driver.get(profile_url)
# Navigation - DO NOT CHANGE
username_field = driver.find_element(By.NAME, "username")
password_field = driver.find_element(By.NAME, "password")
# Send username and password
username_field.send_keys(username)
password_field.send_keys(password)
# Login and save screenshot
driver.find_element(By.ID, "login-button").click()
take_screenshot("STC")
print("SkipTheCommericals Screenshoted")
if "STT" in config["wanted-trackers"]["trackers"]:
print("Entering SkipTheTrailers.")
username = config["skipthetrailers"]["username"]
password = config["skipthetrailers"]["password"]
profile_url = config["skipthetrailers"]["profile_url"]
driver.get(profile_url)
# Navigation - DO NOT CHANGE
username_field = driver.find_element(By.NAME, "username")
password_field = driver.find_element(By.NAME, "password")
# Send username and password
username_field.send_keys(username)
password_field.send_keys(password)
# Login and save screenshot
driver.find_element(By.ID, "login-button").click()
take_screenshot("STT")
print("SkipTheTrailers Screenshoted")
if "AB" in config["wanted-trackers"]["trackers"]:
print("Entering AnimeBytes")
username = config["animebytes"]["username"]
password = config["animebytes"]["password"]
profile_url = config["animebytes"]["profile_url"]
driver.get(
"https://animebytes.tv/user.php"
) # Keep the link as it is, DO NOT CHANGE.
# Navigation - Login
username_field = driver.find_element(By.NAME, "username")
password_field = driver.find_element(By.NAME, "password")
# Send username and password
username_field.send_keys(username)
password_field.send_keys(password)
# Login
driver.find_element(By.CLASS_NAME, "submit").click()
# Load profile and screenshot
driver.get(profile_url) # Add your profile link
take_screenshot("AB")
print("AnimeBytes Screenshoted")
if "TDC" in config["wanted-trackers"]["trackers"]:
print("Entering TheDarkCommunity")
username = config["thedarkcommunity"]["username"]
password = config["thedarkcommunity"]["password"]
profile_url = config["thedarkcommunity"]["profile_url"]
driver.get(profile_url)
# Navigation
username_field = driver.find_element(By.NAME, "username")
password_field = driver.find_element(By.NAME, "password")
# Send username and password
username_field.send_keys(username)
password_field.send_keys(password)
# Login and save screenshot
driver.find_element(By.ID, "login-button").click()
take_screenshot("TDC")
print("TDC Screenshoted")
if "CRT" in config["wanted-trackers"]["trackers"]:
print("Entering Cathode-Ray.tube")
username = config["cathode-raytube"]["username"]
password = config["cathode-raytube"]["password"]
profile_url = config["cathode-raytube"]["profile_url"]
driver.get(
"https://www.cathode-ray.tube/login"
) # Keep the link as it is, DO NOT CHANGE.
# Navigation - Login
username_field = driver.find_element(By.NAME, "username")
password_field = driver.find_element(By.NAME, "password")
# Send username and password
username_field.send_keys(username)
password_field.send_keys(password)
# Login
driver.find_element(By.ID, "login_button").click()
# 2FA is enabled, ask for the code
if driver.find_elements(By.NAME, "code"):
code = input("Please enter the 2FA code: ")
code_field = driver.find_element(By.NAME, "code")
code_field.send_keys(code)
driver.find_element(By.ID, "login_button").click()
# Load profile and screenshot
driver.get(profile_url)
# Hide passkey
try:
passkey_li = driver.find_element(By.XPATH, "//li[contains(text(), 'Passkey')]")
driver.execute_script("arguments[0].style.display = 'none';", passkey_li)
except: # noqa: E722
pass
take_screenshot("CRT")
print("CRT Screenshoted")
if "MAM" in config["wanted-trackers"]["trackers"]:
print("Entering myanonamouse")
username = config["myanonamouse"]["username"]
password = config["myanonamouse"]["password"]
profile_url = config["myanonamouse"]["profile_url"]
driver.get(profile_url)
# Navigation
username_field = driver.find_element(By.NAME, "email")
password_field = driver.find_element(By.NAME, "password")
# Send username and password
username_field.send_keys(username)
password_field.send_keys(password)
# Login and save screenshot
driver.find_element(By.CLASS_NAME, "btn").click()
take_screenshot("MAM")
print("myanonamouse Screenshoted")
if "NBL" in config["wanted-trackers"]["trackers"]:
print("Entering Nebulance")
username = config["nebulance"]["username"]
password = config["nebulance"]["password"]
profile_url = config["nebulance"]["profile_url"]
driver.get(profile_url)
# Navigation
username_field = driver.find_element(By.NAME, "username")
password_field = driver.find_element(By.NAME, "password")
# Send username and password
username_field.send_keys(username)
password_field.send_keys(password)
# Login and save screenshot
driver.find_element(By.NAME, "login").click()
take_screenshot("NBL")
print("Nebulance Screenshoted")
if "TL" in config["wanted-trackers"]["trackers"]:
print("Entering TorrentLeech")
username = config["torrentleech"]["username"]
password = config["torrentleech"]["password"]
profile_url = config["torrentleech"]["profile_url"]
driver.get(profile_url)
# Navigation - Login
username_field = driver.find_element(By.NAME, "username")
password_field = driver.find_element(By.NAME, "password")
# Send username and password
username_field.send_keys(username)
password_field.send_keys(password)
# Login and save screenshot
driver.find_element(By.CLASS_NAME, "btn").click()
take_screenshot("TL")
print("TorrentLeech Screenshoted")
if "OPS" in config["wanted-trackers"]["trackers"]:
print("Entering Orpheus")
username = config["orpheus"]["username"]
password = config["orpheus"]["password"]
profile_url = config["orpheus"]["profile_url"]
driver.get(
"https://orpheus.network/login.php"
) # Keep the link as it is, DO NOT CHANGE.
# Navigation - Login
username_field = driver.find_element(By.NAME, "username")
password_field = driver.find_element(By.NAME, "password")
twofa_field = driver.find_element(By.NAME, "twofa")
# Send username and password
username_field.send_keys(username)
password_field.send_keys(password)
# 2FA, ask for the code
code = input(
"Please enter the 2FA code: (If you don't have 2FA, just press enter.) "
)
twofa_field.send_keys(code)
# Login
driver.find_element(By.CLASS_NAME, "submit").click()
# Load profile and screenshot
driver.get(profile_url) # Add your profile link
take_screenshot("OPS")
print("OPS Screenshoted")
if "SZN" in config["wanted-trackers"]["trackers"]:
print("Entering Swarmazon")
username = config["swarmazon"]["username"]
password = config["swarmazon"]["password"]
profile_url = config["swarmazon"]["profile_url"]
driver.get("https://swarmazon.club/en/account/login.php")
# Navigation - Login
username_field = driver.find_element(By.NAME, "username")
password_field = driver.find_element(By.NAME, "password")
# Send username and password
username_field.send_keys(username)
password_field.send_keys(password)
# Login
driver.find_element(By.CLASS_NAME, "btn").click()
# Load profile and screenshot
driver.get(profile_url) # Keep as-is
take_screenshot("Swarmazon")
print("Swarmazon Screenshoted")
if "MTV" in config["wanted-trackers"]["trackers"]:
print("Entering MoreThanTV")
username = config["morethantv"]["username"]
password = config["morethantv"]["password"]
profile_url = config["morethantv"]["profile_url"]
driver.get(profile_url)
# Navigation - DO NOT CHANGE
username_field = driver.find_element(By.NAME, "username")
password_field = driver.find_element(By.NAME, "password")
# Send username and password
username_field.send_keys(username)
password_field.send_keys(password)
driver.find_element(By.ID, "login_button").click()
# 2FA is enabled, ask for the code
if driver.find_elements(By.NAME, "code"):
code = input("Please enter the 2FA code: ")
code_field = driver.find_element(By.NAME, "code")
code_field.send_keys(code)
driver.find_element(By.ID, "login_button").click()
# Hide passkey
try:
passkey_li = driver.find_element(By.XPATH, "//li[contains(text(), 'Passkey')]")
driver.execute_script("arguments[0].style.display = 'none';", passkey_li)
except: # noqa: E722
pass
# Login and save screenshot
take_screenshot("MoreThanTV")
print("MoreThanTV Screenshoted")
if "HDT" in config["wanted-trackers"]["trackers"]:
print("Entering HD-Torrents")
username = config["hdtorrents"]["username"]
password = config["hdtorrents"]["password"]
profile_url = config["hdtorrents"]["profile_url"]
driver.get("https://hd-torrents.org") # Keep the link as it is, DO NOT CHANGE.
# Navigation - Login
username_field = driver.find_element(By.NAME, "uid")
password_field = driver.find_element(By.NAME, "pwd")
# Send username and password
username_field.send_keys(username)
password_field.send_keys(password)
# Login
driver.find_element(
By.XPATH,
"/html/body/div[3]/table/tbody/tr/td/form/table/tbody/tr/td[1]/table/tbody/tr/td[5]/input",
).click()
# Load profile and screenshot
driver.get(profile_url) # Add your profile link
take_screenshot("HDT")
print("HDT Screenshoted")
if "BTN" in config["wanted-trackers"]["trackers"]:
with SB(uc=True, locale_code="en") as sb:
print("Entering BroadcasTheNet")
username = config["broadcasthenet"]["username"]
password = config["broadcasthenet"]["password"]
profile_url = config["broadcasthenet"]["profile_url"]
sb.driver.uc_open_with_reconnect(profile_url, 1)
# Navigation - DO NOT CHANGE
username_field = "input[id='username']"
password_field = "input[id='password']"
login_button = "input[name='login']"
# Send username and password
sb.type(username_field, username)
sb.type(password_field, password)
sb.driver.reconnect(0.1)
sb.driver.uc_click(login_button, reconnect_time=4)
sb.wait_for_text_not_visible("Checking", timeout=10)
# 2FA is enabled, ask for the code
if sb.driver.find_elements(By.ID, "code"):
code = input("Please enter the 2FA code: ")
code_field = "input[id='code']"
sb.type(code_field, code)
submit_button = "input[type='submit']"
sb.driver.uc_click(submit_button, reconnect_time=4)
sb.driver.get(profile_url)
info_button = "a[href='#section2']"
sb.driver.uc_click(info_button, reconnect_time=4)
# Login and save screenshot
take_screenshot("BroadcasTheNet", sb.driver)
print("BroadcasTheNet Screenshoted")
if "GGN" in config["wanted-trackers"]["trackers"]:
print("Entering GazelleGames")
username = config["gazellegames"]["username"]
password = config["gazellegames"]["password"]
profile_url = config["gazellegames"]["profile_url"]
driver.get(profile_url)
# Navigation - DO NOT CHANGE
username_field = driver.find_element(By.NAME, "username")
password_field = driver.find_element(By.NAME, "password")
twofa_field = driver.find_element(By.NAME, "authkey")
print(
"Manually solve the captcha image. Press enter when done. (If you use 2FA then press enter after you type the code below)"
)
code = input()
# Send username and password
username_field.send_keys(username)
password_field.send_keys(password)
twofa_field.send_keys(code)
driver.find_element(By.CLASS_NAME, "submit").click()
# Login and save screenshot
take_screenshot("GazelleGames")
print("GazelleGames Screenshoted")
if "PTP" in config["wanted-trackers"]["trackers"]:
print("Entering PassThePopcorn")
username = config["passthepopcorn"]["username"]
password = config["passthepopcorn"]["password"]
profile_url = config["passthepopcorn"]["profile_url"]
driver.get(profile_url)
# Navigation - DO NOT CHANGE
username_field = driver.find_element(By.NAME, "username")
password_field = driver.find_element(By.NAME, "password")
# Send username and password
username_field.send_keys(username)
password_field.send_keys(password)
driver.find_element(By.ID, "login-button").click()
print("Manually solve the captcha image. Press enter when done.")
code = input()
driver.find_element(By.ID, "login-button").click()
# 2FA is enabled, ask for the code
if driver.find_elements(By.ID, "tfa-code"):
code = input("Please enter the 2FA code: ")
code_field = driver.find_element(By.ID, "tfa-code")
code_field.send_keys(code)
verify_button = driver.find_element(By.CSS_SELECTOR, "input[value='Verify']")
verify_button.click()
# is_load_at_runtime is set to ensure the full page screenshot is taken correctly
if config["settings"].get("full_page_screenshot", "false") == "true":
take_screenshot("PassThePopcorn", is_load_at_runtime=True)
else:
take_screenshot("PassThePopcorn")
print("PassThePopcorn Screenshoted")
if "BHD" in config["wanted-trackers"]["trackers"]:
print("Entering BeyondHD")
username = config["beyond-hd"]["username"]
password = config["beyond-hd"]["password"]
profile_url = config["beyond-hd"]["profile_url"]
driver.get(profile_url)
# Navigation - DO NOT CHANGE
username_field = driver.find_element(By.NAME, "username")
password_field = driver.find_element(By.NAME, "password")
print("Manually solve the captcha. Press enter when done.")
code = input()
# Send username and password
username_field.send_keys(username)
password_field.send_keys(password)
driver.find_element(By.ID, "login-button").click()
# 2FA is enabled, ask for the code
if driver.find_elements(By.ID, "code"):
code = input("Please enter the 2FA code: ")
code_field = driver.find_element(By.ID, "code")
code_field.send_keys(code)
driver.find_element(By.ID, "login-button").click()
driver.get(profile_url)
# Login and save screenshot
take_screenshot("BeyondHD")
print("BeyondHD Screenshoted")
if "OTW" in config["wanted-trackers"]["trackers"]:
print("Entering OTW.")
username = config["oldtoons"]["username"]
password = config["oldtoons"]["password"]
profile_url = config["oldtoons"]["profile_url"]
driver.get(profile_url)
# Navigation
username_field = driver.find_element(By.NAME, "username")
password_field = driver.find_element(By.NAME, "password")
# Send username and password
username_field.send_keys(username)
password_field.send_keys(password)
# Login and save screenshot
driver.find_element(By.CLASS_NAME, "auth-form__primary-button").click()
# 2FA is enabled, ask for the code
if driver.find_elements(By.ID, "code"):
code = input("Please enter the 2FA code: ")
code_field = driver.find_element(By.ID, "code")
code_field.send_keys(code)
take_screenshot("OTW")
print("OTW Screenshoted")
else:
driver.quit()
driver.quit()
# GitHub: https://github.com/KlevGG/TrackerScreenshot