top habitué au JS
This commit is contained in:
parent
22ea727c47
commit
12eba5cde7
7
V6.py
7
V6.py
|
@ -4,7 +4,7 @@ import random
|
||||||
from modules.Classes.Config import Config
|
from modules.Classes.Config import Config
|
||||||
from modules.Classes.DiscordLogger import DiscordLogger
|
from modules.Classes.DiscordLogger import DiscordLogger
|
||||||
from modules.Classes.UserCredentials import UserCredentials
|
from modules.Classes.UserCredentials import UserCredentials
|
||||||
from modules.Tools.logger import critical
|
from modules.Tools.logger import critical, warning
|
||||||
from modules.cards import *
|
from modules.cards import *
|
||||||
from modules.config import *
|
from modules.config import *
|
||||||
from modules.db import add_to_database
|
from modules.db import add_to_database
|
||||||
|
@ -267,7 +267,8 @@ def all_cards():
|
||||||
|
|
||||||
try:
|
try:
|
||||||
activity = findall("data-bi-id=\"([^\"]+)\"", card_list[i].get_attribute("innerHTML"))[0]
|
activity = findall("data-bi-id=\"([^\"]+)\"", card_list[i].get_attribute("innerHTML"))[0]
|
||||||
except:
|
except Exception as e:
|
||||||
|
warning("Can't find activity." + str(e))
|
||||||
activity = ""
|
activity = ""
|
||||||
|
|
||||||
custom_sleep(1.5)
|
custom_sleep(1.5)
|
||||||
|
@ -349,7 +350,7 @@ def explore_on_bing(activity: str, config: Config):
|
||||||
driver = config.WebDriver.driver
|
driver = config.WebDriver.driver
|
||||||
|
|
||||||
def search_bing(txt):
|
def search_bing(txt):
|
||||||
search_elm = driver.get_element(By.ID, "sb_form_q")
|
search_elm = driver.find_element(By.ID, "sb_form_q")
|
||||||
send_keys_wait(search_elm, txt)
|
send_keys_wait(search_elm, txt)
|
||||||
send_keys_wait(search_elm, Keys.ENTER)
|
send_keys_wait(search_elm, Keys.ENTER)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue