0

I need to parse dynamic webpage (YouTube playlist). It has a button "MORE" at the end of the playlist to add more clips to the page. I have a script for parsing and it works but only with first 100 clips, because cheerio doesn't work with dynamic pages. I know that I should use phantomjs but I can't understand how to deal with it.

I simulated the click on this button and what's next? How to "reload" page for extracting new html code?

Thanks a lot!

levshkatov
  • 477
  • 2
  • 5
  • 16
  • If you click on the "more" button, then you probably expect something to happen on the current page. You don't need to reload (although PhantomJS has a reload function). Instead you should wait a bit before getting the page source. – Artjom B. Mar 19 '16 at 17:12
  • @ArtjomB. So, how to wait a bit? :D – levshkatov Mar 19 '16 at 17:23

1 Answers1

1

You have no need to parse pages. Please check Youtube API https://developers.google.com/youtube/v3/code_samples/javascript

Undefitied
  • 747
  • 5
  • 14