Scraping dynamic content in a website

后端 未结 4 1554
梦如初夏
梦如初夏 2020-11-28 13:18

I need to scrape news announcements from this website, Link. The announcements seem to be generated dynamically. They dont appear in the source. I usually use mechanize but

4条回答
  •  -上瘾入骨i
    2020-11-28 13:53

    The polite option would be to ask the owners of the site if they have an API which allows you access to their news stories.

    The less polite option would be to trace the HTTP transactions that take place while the page is loading and work out which one is the AJAX call which pulls in the data.

    Looks like it's this one. But it looks like it might contain session data, so I don't know how long it will continue to work for.

提交回复
热议问题