owndll 2.0.3
Download social media content using telegram bot
Requires Python: >=3.9

# Telegrambot

<div align="center">

A feature-rich command line social media content downloader.

[![Release version](https://img.shields.io/github/v/release/karthiksenniyappan/telegrambot?color=brightgreen&label=Download&style=for-the-badge)](#installation "Installation")
[![PyPI](https://img.shields.io/badge/-PyPI-blue.svg?logo=pypi&labelColor=555555&style=for-the-badge)](https://pypi.org/project/owndll "PyPI")
[![CI Status](https://img.shields.io/github/actions/workflow/status/karthiksenniyappan/telegrambot/python-app.yml?branch=main&label=Tests&style=for-the-badge)](https://github.com/karthiksenniyappan/telegrambot/actions "CI Status")

</div>

Owndll is a feature-rich command-line audio/video/image downloader with support for many sites. It will download content
then sent to the telegram.

### First create the .env file

```text
BOT_API_KEY = <BOT_API_KEY>
BOT_NAME = <BOT_NAME>
GROUP_CHANNEL_NAME = <ANY_GROUP_ID>
BOT_CHANNEL_NAME = <BOT_CHANNEL_ID>
ALLOWED_SITES = "["foo", "bar"]" 
APACHE_SERVER = "http://localhost"
APIFY_TOKEN = <APIFY_TOKEN>
APIFY_ACTOR = <APIFY_ACTOR>
RAPID_API_KEY= <RAPID_API_KEY>
```

Allowed sites e.g www.foo.com, www.bar.com and etc...

### How to get chat id

Refer this link to get the chat id https://medium.com/@2mau/how-to-get-a-chat-id-in-telegram-1861a33ca1de

Also refer this https://gist.github.com/nafiesl/4ad622f344cd1dc3bb1ecbe468ff9f8a

Send self message in bot channel to get bot channel id.

- [INSTALLATION](#installation)
- [DESCRIPTION](#description)
- [OPTIONS](#options)
- [EMBEDDING OWNDLL](#embedding-owndll)

# INSTALLATION

Owndll is available on PyPI:

```shell
 $ python -m pip install owndll
```

Owndll officially supports Python 3.8+.

# DESCRIPTION

**owndll** is a command-line program to download videos from social media content and a few more sites. It requires the
Python interpreter, version 3.8+, and it is not platform specific. It should work on your Unix box, on
Windows or on macOS. It is released to the public domain, which means you can modify it, redistribute it or use it
however you like.

```shell
 $ owndll [-h] [-b] [-c] [-V] [-g] {dl,server,cdn,insta} ...
```

# OPTIONS

```text
  -h, --help            show this help message and exit
  -b, --bot             Start the telegram bot. It will listen chat message and give file's if match download case
  -c, --copy            Other commands never work while pass this flag
  -V, --vpn             Download content using VPN
  -g, --generate        Generate a html file
  -tb TERABOX, --terabox TERABOX
                        Download terabox file

```

# Subcommands Options

```text
  {dl,server,cdn,insta}
    dl                  Download file and send to telegram
    server              Download file and get the file link
    cdn                 Access the media file using CDN server
    insta               Download instagram all post from username

```

# EMBEDDING OWNDLL

From a Python program, you can embed owndll in a more powerful fashion, like this:

```python
from owndll import bot

tb = bot.TelegramBot(['https://www.bot.com/server/video.mp4'])
tb.extract_files()
```