Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arturbien/news-scraping-mastodon-bot
🤖 Mastodon bot posting news scraped with Headless Chrome / Puppeteer
https://github.com/arturbien/news-scraping-mastodon-bot
Last synced: 3 days ago
JSON representation
🤖 Mastodon bot posting news scraped with Headless Chrome / Puppeteer
- Host: GitHub
- URL: https://github.com/arturbien/news-scraping-mastodon-bot
- Owner: arturbien
- Created: 2018-10-19T16:13:42.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-22T17:21:11.000Z (about 6 years ago)
- Last Synced: 2024-11-09T17:46:33.224Z (about 2 months ago)
- Language: JavaScript
- Size: 96.7 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🤖 News-scraping Mastodon bot
* Headless Chrome scrapes [watch news](https://www.watchtime.com/category/wristwatch-industry-news/)
* images are downloaded into `/images` folder
* scraped data is formatted and posted on [Mastodon](https://botsin.space/about) using Mastodon API![example](https://user-images.githubusercontent.com/28541613/47305825-f8722200-d62a-11e8-863c-7c8c2fbcbe75.png)
## Installation
```
$ git clone https://github.com/arturbien/news-scraping-mastodon-bot.git
$ cd news-scraping-mastodon-bot
$ npm install
```## Configuration
Create `.env` file in the root folder and fill it with your Mastodon credentials (see `.env.example`):
```
APP_ID=
APP_KEY=
APP_TOKEN=
```Image path/extension/name settings (optional) in `/config.js`
```javascript
module.exports = {
image: {
path: "./images/",
name: "image_",
extension: "png"
},
maxPosts: 5 //max number of posts
};
```## Usage
```
$ node bot.js
```