Scraping a Facebook App for Data

后端 未结 5 1587
鱼传尺愫
鱼传尺愫 2021-01-03 11:14

I\'m using a Facebook application that has a rich set of information that I\'d like to get at offline. To do this, I essentially need to read the infromation from the web pa

相关标签:
5条回答
  • 2021-01-03 12:00

    I think they're using cookies to pass authentication, so first you'll need your app to login to facebook, and keep the cookie in a CookieContainer, then assign that to req.CookieContainer, and only then req.GetResponse();

    0 讨论(0)
  • 2021-01-03 12:06

    You will first have to write a script to programmatically log into facebook. Then you will have to save the cookies you get.

    I have done something similar with curl and php. (curl has built in cookie handling)

    0 讨论(0)
  • 2021-01-03 12:07

    As far as I understood you just need to login to facebook appliction, right? Use any web scraping/crawling framework for it (they support JS, cookies, etc.). They just emulate usuall web browsing. For example, try these:

    http://scrapy.org/

    http://wwwsearch.sourceforge.net/mechanize/

    http://watin.sourceforge.net/

    Also see

    .Net Screen scraping and session

    0 讨论(0)
  • 2021-01-03 12:09

    You need to use the facebook API to get data from facebook. They block screenscaping

    0 讨论(0)
  • 2021-01-03 12:11

    Facebook uses REST so you can request the data from the server; it also has the ability to access data from the client-side JavaScript API. You can check the wiki for more information; it uses a rest_server.php?method= to get the data from the appropriate methods.

    Check out http://www.facebook.com/developers to get more information about these objects/methods/creating an application so you can query facebook data.

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