scraping data from facebook page #326
-
Hi, was wondering if there's a way to extract the number of likes/followers a page on facebook has (i.e. not just the posts or not data from a profile.) Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Sure - this commit (adfd6da) adds a new function called get_page_info. Usage: from pprint import pprint
from facebook_scraper import *
pprint(get_page_info("Nintendo")) output {'dateCreated': '2011-06-01T15:23:50-0700',
'followers': 5469624,
'identifier': 119240841493711,
'image': 'https://scontent.fhlz2-1.fna.fbcdn.net/v/t1.18169-1/13138816_1025939437490509_1827627750936743506_n.png?_nc_cat=1&ccb=1-3&_nc_sid=8d0d6e&_nc_ohc=xam_jLPoWYgAX8lPUCE&_nc_ht=scontent.fhlz2-1.fna&oh=8134938ede2a41a4250ac81e95cfc235&oe=60E61E52',
'likes': 5410941,
'name': 'Nintendo',
'sameAs': 'http://www.nintendo.com',
'type': 'Organization',
'url': 'https://www.facebook.com/Nintendo/'} |
Beta Was this translation helpful? Give feedback.
-
businesses = ['bpattorney', I pulled each of these page names from the URL to be safe. Some return just likes; some return nothing at all. |
Beta Was this translation helpful? Give feedback.
Sure - this commit (adfd6da) adds a new function called get_page_info. Usage:
output