我建议使用 Selenium ,这将允许您登录到Facebook,导航到所需的页面,并检索HTML。然后可以将html传递给 BeautifulSoup . 看看这个 blog post 开始吧。
Selenium
BeautifulSoup