Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/snoopycodex/autopokeback

A simple web scraper made using PuppeteerJS and NodeJS that automates pressing the "Poke Back" button whenever a facebook friend/user pokes you.
https://github.com/snoopycodex/autopokeback

autopokeback chrome-headless-shell nodejs puppeteerjs

Last synced: 3 days ago
JSON representation

A simple web scraper made using PuppeteerJS and NodeJS that automates pressing the "Poke Back" button whenever a facebook friend/user pokes you.

Awesome Lists containing this project

README

        

![banner](./pictures/banner.png)

## Auto Poke Back (Facebook web scraper)

A simple web scraper made using [PuppeteerJS](https://pptr.dev) and NodeJS that automates pressing the "Poke Back" button whenever a facebook friend/user pokes you.

### Setup

First, run:

```bash
npm install
```

Then, run:

```bash

npx @puppeteer/browsers install chrome-headless-shell@latest
```

After that, open and edit the .env file and replace the keys with their respective values, however, the `USER_AGENT` key's value is optional and may be left as-is.

```bash
# Your facebook email address
[email protected]

# Your facebook password
FB_PASS=yourpassword123

# Browser user agent (optional)
USER_AGENT='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 Edg/123.0.2420.81'
```

Once all are done, you may then run:

```bash
node index.js
```

**NOTE:** If you encounter a checkpoint, just open your facebook account in your another device and check your notification for a login approval request. Click it and just approve your login then wait for a few seconds and this tool will detect the approval. However, facebook's login checkpoint may also mean that your account has been marked as spam or temporarily disabled by facebook.

### Preview
![preview](./pictures/preview.png)

### Possible Improvements
- [ ] Login cookie (to avoid relogging in and going through the login checkpoint everytime)
- [x] Incorrect email/password detection
- [x] 2-Step Verification detection
- [x] Manual logging in when .env file is not present
- [x] Better error handling (like timeouts, unhandled exceptions, etc.)

### Disclaimer
I will not be responsible for any damages/consequences that this may cause to your and/or other's account(s). Please use at your own risk.