Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 97813

scraping tiktok webpage with selenium (python), video not loaded

$
0
0

Having exactly the same problem with

Selenium is not loading TikTok pages

There's nothing inside div class="jsx-1792501825 video-feed" tag, where originally the video informations are supposed to be located.

driver = webdriver.Chrome('chromedriver',options=options)
driver.get("https://www.tiktok.com/trending")
time.sleep(10)
driver.execute_script("scroll(0, 2500);")
video_feed = driver.find_element_by_css_selector('html > body > div > div > div > div > div > div > div > main')
print(video_feed.get_attribute('innerHTML'))

result

<div class="jsx-1792501825 video-feed"></div><div class="jsx-1970579021 jsx-1005258868 tiktok-loading feed-loading"></div>

Viewing all articles
Browse latest Browse all 97813

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>