-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathotros.py
36 lines (24 loc) · 864 Bytes
/
otros.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
def initiate_driver():
options = webdriver.ChromeOptions()
options.add_experimental_option("detach", True)
service = ChromeService(executable_path=ChromeDriverManager().install())
browser = webdriver.Chrome(options=options, service=service)
browser.maximize_window()
browser.implicitly_wait(10)
return browser
def print_list(list, turn_into_txt=False, search_style=False):
list = []
if len(list) <= 0:
raise IndexError("Sorry, empty list")
for idx, val in enumerate(list):
if turn_into_txt == True:
text = val.text
val = text
if search_style == True:
# print(val.find_all("span", {"style": "color:rgb(0, 0, 0)"}))
return
print(val)
list.append(val)
print(idx, val)
# string = " ".join(list)
# return(string)