csabapalfi / facebook-scrape-group Goto Github PK
View Code? Open in Web Editor NEW๐ธ๏ธ Scrape facebook group post permalinks
๐ธ๏ธ Scrape facebook group post permalinks
Hi,
Great project! I think it might be used by many people, hope you will continue working on it!
First when I ran node index.js <groupid> | tee permalinks.csv
I got Error: Cannot find module 'chrome-launcher'
, so I installed chrome-launcher with npm install chrome-launcher
.
Now what happens is that Chrome opens with a new default account, so I'm not logged in in FB anymore, so I can't scrape. Do you know how to fix it?
P.S.
While Graph API is a useful thing, you can only use it if you have the group token, which is often not the case...
What this script does with puppeteer can be easily achieved way more easily using the facebook Graph API.
https://developers.facebook.com/tools/explorer/?method=GET&path=%7Bgroup-id%7D%2Ffeed&version=v3.0
const target = document.querySelector('[aria-label="News Feed"]');
const observer = new MutationObserver((records) => console.log(records));
observer.observe(target, {childList: true});
await page.evaluate(() => {
const observer = new MutationObserver(
function() {
// communicate with node through console.log method
console.log('__mutation')
}
)
const config = {
attributes: true,
childList: true,
characterData: true,
subtree: true
}
observer.observe(target, config)
})
page.on('console', async (msg) => {
if (msg.text === '__mutation') {
// do something...
}
})
Pls help me!
pgrep Chrome \| xargs kill && node index.js
npm ERR! Exit status 255 npm ERR! npm ERR! Failed at the [email protected] start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\hdchau\AppData\Roaming\npm-cache_logs\2019-02-14T06_21_44_028Z-debug.logA declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.