Has anyone tried Selenium scraping YouTube? Need tips for handling dynamic content! or Is Selenium sc

18 Replies, 766 Views

Selenium scraping YouTube is a grind, but here’s my hack:

Use `driver.page_source` after waits to get the HTML, then parse with `BeautifulSoup`. Faster than waiting for every element.

For comments, sometimes you gotta refresh the page and retry. Annoying, but it’s YouTube’s fault.

Shadow DOM? Just ignore it unless you absolutely need it. Not worth the hassle.

Messages In This Thread



Users browsing this thread: 1 Guest(s)