I can't get the whole source code of an HTML page

前端 未结 2 955
清酒与你
清酒与你 2021-01-22 19:47

Using Python, I want to crawl data on a web page whose source if quite big (it is a Facebook page of some user).

Say the URL is the URL I am trying to crawl. I run the

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-22 20:03

    Facebook is heavily Javascript orientated. The page source you see in the browser is the DOM after after any JS code has run (and the page source will frequently be changing anyway). You may have to automate a browser (using Selenium), or try other tools such as mechanize... Or look into a proper FB app and use the FB API.

提交回复
热议问题