Skip to content

Commit 6be94ba

Browse files
authored
🏁 βœ… Final v0.3.5
Fixed issue with new report button where no further execution would happen due to "red button" being found.
1 parent 200cead commit 6be94ba

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

β€Žseerrbridge.py

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# =============================================================================
2-
# Soluify.com | Your #1 IT Problem Solver | {SeerrBridge v0.3.4}
2+
# Soluify.com | Your #1 IT Problem Solver | {SeerrBridge v0.3.5}
33
# =============================================================================
44
# __ _
55
# (_ _ | .(_
@@ -852,10 +852,18 @@ def search_on_debrid(movie_title, driver):
852852

853853
# Step 2: Check if any red buttons (RD 100%) exist and verify the title for each
854854
try:
855-
red_buttons_elements = driver.find_elements(By.XPATH, "//button[contains(@class, 'bg-red-900/30')]")
856-
logger.info(f"Found {len(red_buttons_elements)} red button(s) (100% RD). Verifying titles before deciding to skip.")
855+
# Find all red buttons
856+
all_red_buttons_elements = driver.find_elements(By.XPATH, "//button[contains(@class, 'bg-red-900/30')]")
857+
858+
# Filter out the buttons that contain "Report" in their text
859+
red_buttons_elements = [button for button in all_red_buttons_elements if "Report" not in button.text]
860+
861+
# Log the count of filtered red buttons
862+
logger.info(f"Found {len(red_buttons_elements)} red button(s) (100% RD) without 'Report'. Verifying titles.")
857863

858864
for i, red_button_element in enumerate(red_buttons_elements, start=1):
865+
if "Report" in red_button_element.text:
866+
continue
859867
logger.info(f"Checking red button {i}...")
860868

861869
try:
@@ -960,10 +968,18 @@ def search_on_debrid(movie_title, driver):
960968

961969
# Step 7: Check if any red button (RD 100%) exists again before continuing
962970
try:
963-
red_buttons_elements = driver.find_elements(By.XPATH, "//button[contains(@class, 'bg-red-900/30')]")
964-
logger.info(f"Found {len(red_buttons_elements)} red button(s) (100% RD). Verifying titles before deciding to skip.")
971+
# Find all red buttons
972+
all_red_buttons_elements = driver.find_elements(By.XPATH, "//button[contains(@class, 'bg-red-900/30')]")
973+
974+
# Filter out the buttons that contain "Report" in their text
975+
red_buttons_elements = [button for button in all_red_buttons_elements if "Report" not in button.text]
976+
977+
# Log the count of filtered red buttons
978+
logger.info(f"Found {len(red_buttons_elements)} red button(s) (100% RD) without 'Report'. Verifying titles.")
965979

966980
for i, red_button_element in enumerate(red_buttons_elements, start=1):
981+
if "Report" in red_button_element.text:
982+
continue
967983
logger.info(f"Checking red button {i}...")
968984

969985
try:

0 commit comments

Comments
Β (0)