We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e3aa69 commit b227714Copy full SHA for b227714
examples/cdp_mode/raw_tiktok.py
@@ -3,8 +3,14 @@
3
with SB(uc=True, test=True, guest=True) as sb:
4
url = "https://www.tiktok.com/@startrek?lang=en"
5
sb.activate_cdp_mode(url)
6
- sb.sleep(3)
7
- print(sb.get_text('h2[data-e2e="user-bio"]'))
8
- for i in range(54):
9
- sb.scroll_down(12)
+ sb.sleep(2.5)
+ sb.click_if_visible('button[data-close-button="true"]')
+ print("*** " + sb.get_text('h2[data-e2e="user-bio"]'))
+ for i in range(33):
10
+ sb.scroll_by_y(33)
11
+ sb.sleep(0.03)
12
+ items = sb.find_elements("picture img")
13
+ for i, item in enumerate(items):
14
+ print("* %s: %s" % (i, str(item.get_attribute("alt"))))
15
+ print("*** %s total items found!" % len(items))
16
sb.sleep(1)
0 commit comments