Web Scraping javascript in Python / R

后端 未结 1 548
-上瘾入骨i
-上瘾入骨i 2021-01-26 05:23

I\'m doing some personal data science projects and one of them is to see how often certain songs are played on the radio.

http://www.iheart.com/live/radio-1045-3401/

1条回答
  •  深忆病人
    2021-01-26 05:48

    1. Most web pages that involve dynamic elements have page elements generated and inserted by Javascript that the browser parses and executes for you. You already guessed this, I suspect, based on the question title.

      What you see in the page source is the raw HTML before Javascript kicks in and updates it.

    2. You want a headless browser: a browser without a graphical user interface. This will parse and execute Javascript for you, and update page HTML accordingly.


    Here is a full list of headless browsers. Note that you can do this task in any language.

    0 讨论(0)
提交回复
热议问题