Skip to content

Commit

Permalink
🏁 βœ… Final v0.4.4
Browse files Browse the repository at this point in the history
Updated payload requirements and fixed time error message to avoid stacktrace
  • Loading branch information
Woahai321 authored Jan 4, 2025
1 parent df14d1b commit 1f17f1f
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions seerrbridge.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# =============================================================================
# Soluify.com | Your #1 IT Problem Solver | {SeerrBridge v0.4.3}
# Soluify.com | Your #1 IT Problem Solver | {SeerrBridge v0.4.4}
# =============================================================================
# __ _
# (_ _ | .(_
Expand Down Expand Up @@ -108,8 +108,8 @@ class RequestInfo(BaseModel):
requestedBy_email: str
requestedBy_username: str
requestedBy_avatar: str
requestedBy_settings_discordId: str
requestedBy_settings_telegramChatId: str
requestedBy_settings_discordId: Optional[str] = None
requestedBy_settings_telegramChatId: Optional[str] = None

class IssueInfo(BaseModel):
issue_id: str
Expand Down Expand Up @@ -971,14 +971,18 @@ def search_on_debrid(movie_title, driver, extra_data=None):
logger.info(f"Search URL: {url}")

try:
# Directly jump to the search results page after login
driver.get(url)
logger.success(f"Navigated to search results page for {movie_title}.")

# Wait for the results page to load dynamically
WebDriverWait(driver, 30).until(
EC.presence_of_element_located((By.XPATH, f"//a[contains(@href, '/movie/') or contains(@href, '/show/')]"))
)
# Attempt to locate the elements
try:
WebDriverWait(driver, 15).until(
EC.presence_of_element_located((By.XPATH, f"//a[contains(@href, '/movie/') or contains(@href, '/show/')]"))
)
logger.info("Elements are present. Continuing...")
except TimeoutException:
logger.error(f"Timeout while waiting for search results elements for {movie_title}. Stopping processing.")
return

# Clean and normalize the movie title (remove year in parentheses)
movie_title_cleaned = movie_title.split('(')[0].strip()
Expand Down

0 comments on commit 1f17f1f

Please sign in to comment.