Skip to content

Pendonym/Internet-Archival-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Internet Archival Bot

A Discord bot for archiving content to the Internet Archive. Supports archiving git repositories, videos, and web pages via slash commands.

Commands

Command Description
/ping Check bot latency
/git-archive link: [all_files:] [include_wiki:] [all_releases:] [all_branches:] Archive a git repository via iagitbetter
/tubeup-archive link: Archive a video (YouTube or any yt-dlp source) via tubeup
/web-archive link: [outlinks:] [error_pages:] [screenshot:] [disable_adblocker:] [my_web_archive:] Save a web page to the Wayback Machine via Save Page Now
/wiki-archive link: [wiki_type:] Archive a wiki (MediaWiki, DokuWiki, PukiWiki) via wikiteam3 / dokuwiki-dumper / pukiwiki-dumper

Setup

Tip

Don't want to host it yourself? Add the already-running bot to your account or server. Archived content is uploaded under the @yt-dlp_bot Internet Archive account.

1. Install dependencies

pip install -r requirements.txt

2. Configure Internet Archive credentials

Log in with the ia CLI:

ia configure

2a. Export cookies (optional, for age-restricted or private content)

Install the Get cookies.txt LOCALLY Chrome extension, export cookies for youtube.com, save the file, then set the path in .env:

TUBEUP_COOKIES=/path/to/cookies.txt

3. Create a .env file

DISCORD_TOKEN=your_discord_bot_token
IA_CONFIG_FILE=/path/to/ia.ini

4. Run the bot

python main.py
python main.py -v  # verbose logging

Installation

The bot supports both guild and user installs, and can be used in servers, DMs, and group DMs.