mirror of
https://github.com/lemeow125/DRF_Template.git
synced 2025-06-28 16:15:44 +08:00
Lint using autoflake and isort
This commit is contained in:
parent
d126fdbd32
commit
aa52da056c
35 changed files with 128 additions and 115 deletions
|
@ -1,13 +1,13 @@
|
|||
from celery import shared_task
|
||||
from search_results.tasks import create_search_result
|
||||
from selenium.webdriver.common.by import By
|
||||
from webdriver.utils import (
|
||||
setup_webdriver,
|
||||
selenium_action_template,
|
||||
google_search,
|
||||
get_element,
|
||||
get_elements,
|
||||
google_search,
|
||||
selenium_action_template,
|
||||
setup_webdriver,
|
||||
)
|
||||
from selenium.webdriver.common.by import By
|
||||
from search_results.tasks import create_search_result
|
||||
|
||||
|
||||
# Task template
|
||||
|
|
|
@ -2,21 +2,20 @@
|
|||
Settings file to hold constants and functions
|
||||
"""
|
||||
|
||||
import os
|
||||
import random
|
||||
|
||||
import undetected_chromedriver as uc
|
||||
from config.settings import CAPTCHA_TESTING, USE_PROXY, get_secret
|
||||
from selenium import webdriver
|
||||
from selenium.webdriver import FirefoxOptions
|
||||
from selenium.webdriver.common.by import By
|
||||
from selenium.webdriver.common.keys import Keys
|
||||
from config.settings import get_secret
|
||||
from selenium.webdriver.support.ui import WebDriverWait
|
||||
from selenium.webdriver.support import expected_conditions as EC
|
||||
from selenium.webdriver import FirefoxOptions
|
||||
from selenium import webdriver
|
||||
import undetected_chromedriver as uc
|
||||
from config.settings import USE_PROXY, CAPTCHA_TESTING
|
||||
from config.settings import get_secret
|
||||
from selenium.webdriver.support.ui import WebDriverWait
|
||||
from twocaptcha import TwoCaptcha
|
||||
from whois import whois
|
||||
from whois.parser import PywhoisError
|
||||
import os
|
||||
import random
|
||||
|
||||
|
||||
def take_snapshot(driver, filename="dump.png"):
|
||||
|
@ -249,7 +248,7 @@ def execute_selenium_elements(driver, timeout, elements):
|
|||
element["default"]["key"],
|
||||
timeout=timeout,
|
||||
)
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
print(f"Failed to find primary element")
|
||||
# If that fails, try to get the failover one
|
||||
print("Trying to find legacy element")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue