Skip to content

Commit ae9021d

Browse files
committed
Update examples
1 parent b3ea6be commit ae9021d

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

examples/cdp_mode/raw_indeed.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
sb.uc_gui_click_captcha()
88
sb.sleep(1)
99
company = "NASA Jet Propulsion Laboratory"
10-
sb.press_keys('input[data-testid="company-search-box"]', company)
10+
search_box = 'input[data-testid="company-search-box"]'
11+
sb.click(search_box)
12+
sb.sleep(0.1)
13+
sb.press_keys(search_box, company)
1114
sb.click('button[type="submit"]')
1215
sb.click('a:contains("%s")' % company)
1316
sb.sleep(3)

examples/cdp_mode/raw_tiktok.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
from seleniumbase import SB
22

3-
with SB(uc=True, test=True, incognito=True, ad_block=True) as sb:
3+
with SB(uc=True, test=True, ad_block=True) as sb:
44
url = "https://www.tiktok.com/@startrek?lang=en"
55
sb.activate_cdp_mode(url)
6-
sb.sleep(2.5)
7-
sb.cdp.click_if_visible('button:contains("Refresh")')
8-
sb.sleep(1.5)
9-
print(sb.cdp.get_text('h2[data-e2e="user-bio"]'))
6+
sb.sleep(2)
7+
print(sb.get_text('h2[data-e2e="user-bio"]'))
108
for i in range(54):
119
sb.cdp.scroll_down(12)
1210
sb.sleep(1)

0 commit comments

Comments
 (0)