Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/amadejkastelic/discord-video-embed-bot

A discord bot that automatically embeds videos from various sources that do not support embeding.
https://github.com/amadejkastelic/discord-video-embed-bot

bot discord facebook instagram python reddit scraper tiktok twitter youtube

Last synced: 4 days ago
JSON representation

A discord bot that automatically embeds videos from various sources that do not support embeding.

Awesome Lists containing this project

README

        

# discord-video-embed-bot

A Discord bot that automatically embeds media and metadata of messages containing a link of a supported platform.

![image](https://github.com/amadejkastelic/discord-video-embed-bot/assets/26391003/bada7a36-db0d-44ba-89ee-afe4f79ad7d3)

## Supported platforms

- Instagram ✅
- Facebook ✅
- Tiktok ✅
- Reddit ✅
- Twitter ✅
- Youtube Shorts ✅
- Threads ✅

## How to run

Build the docker image: `docker build . -t video-embed-bot` or simply pull it from ghcr:

```bash
docker pull ghcr.io/amadejkastelic/discord-video-embed-bot:
```

Run it with your discord api key: `docker run -e DISCORD_API_TOKEN= video-embed-bot`

### Facebook

Facebook requires you to provide cookies. Download them in your browser using [an extension](https://chrome.google.com/webstore/detail/get-cookiestxt-locally/cclelndahbckbenkjhflpdbgdldlbecc) while you're logged in and mount them to the container).

### Reddit

For extended reddit support you need to create an app on reddit and add the following environment variables:

```bash
REDDIT_API_TOKEN=
REDDIT_API_SECRET=
REDDIT_USER_AGENT=
```

### Twitter

For better twitter support you need to add credentials:

```bash
TWITTER_USERNAME=
TWITTER_EMAIL=
TWITTER_PASSWORD=
```

### Instagram

For better instagram integration that allows to view items that require login, you need to provide the instagram.sess file and instagram username environemnt variable:

```bash
INSTAGRAM_USERNAME=
```

`instagram.sess` file should be in the working directory of your instance

You can obtain the session file by logging into Instagram in Firefox and running:

```bash
python bin/fetch_instagram_session.py
```

### Additional Options

| Env Var | Default Value | Description |
|----------------|---------------|--------------------------------------------------------------------------------------------------------------------------|
| `COMPACT_POST` | false | If set to true, only the url and video will post instead of additional details such as description, author, created, etc |
| | | |