Skip to content

A script to download files from Yandex Disk using public links. Supports single links and batch downloads from a text file.

Notifications You must be signed in to change notification settings

sermelipharo/YandexDown

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 

Repository files navigation

Yandex Disk Downloader

Yandex Disk Static Badge en ru

English

This script allows downloading files from Yandex Disk using public links. The script can work with a single link or with a text file containing a list of links and file names.

Requirements

  • Python 3.x
  • Libraries: requests tqdm

Installation

  1. Clone the repository or download the script.
  2. Install the required libraries:
    pip install requests tqdm

Usage

Download a single file

To download a single file from Yandex Disk, use the following command:

python yandown.py -l <link> -d <download_location>

Or simply:

python yandown.py <link>

Download from a file

To download files from a list contained in a text file, use the following command:

python yandown.py -f <file_path> -d <download_location>

The format of the text file should be as follows: one link per line, followed by the file name, separated by a space, comma, or semicolon.

Example links.txt file:

https://disk.yandex.ru/i/example1 Square
https://disk.yandex.ru/i/example2, Circle
https://disk.yandex.ru/i/example3; Triangle
https://disk.yandex.ru/d/example4
https://disk.yandex.ru/d/example_folder/file.jpg CustomFileName

Command line arguments

  • -l, --link: Link to a Yandex Disk file.
  • -f, --file: Path to a text file with Yandex Disk links.
  • -d, --download_location: Path to save the downloaded files (optional, default is the current directory).

Examples

Download a single file

python yandown.py -l "https://disk.yandex.ru/i/example1" -d "/path/to/save"

Download from a file

python yandown.py -f "/path/to/links.txt" -d "/path/to/save"

Download a single file to the current directory

python yandown.py "https://disk.yandex.ru/i/example1"

Русский

Этот скрипт позволяет загружать файлы с Яндекс.Диска по публичным ссылкам. Скрипт может работать как с одной ссылкой, так и с текстовым файлом, содержащим список ссылок и названий файлов.

Требования

  • Python 3.x
  • Библиотеки: requests tqdm

Установка

  1. Склонируйте репозиторий или скачайте скрипт.
  2. Установите необходимые библиотеки:
    pip install requests tqdm

Использование

Загрузка одного файла

Для загрузки одного файла с Яндекс.Диска используйте следующую команду:

python yandown.py -l <ссылка> -d <путь_для_сохранения>

Или просто:

python yandown.py <ссылка>

Загрузка из файла

Для загрузки файлов из списка, содержащегося в текстовом файле, используйте следующую команду:

python yandown.py -f <путь_к_файлу> -d <путь_для_сохранения>

Формат текстового файла должен быть следующим: одна ссылка на строку, за которой может следовать название файла, разделенное пробелом, запятой или точкой с запятой.

Пример файла links.txt:

https://disk.yandex.ru/i/example1 Квадратик
https://disk.yandex.ru/i/example2, Шарик
https://disk.yandex.ru/i/example3; Треугольник
https://disk.yandex.ru/d/example4
https://disk.yandex.ru/d/example_folder/file.jpg НазваниеФайла

Аргументы командной строки

  • -l, --link: Ссылка на файл Яндекс.Диска.
  • -f, --file: Путь к текстовому файлу с ссылками на файлы Яндекс.Диска.
  • -d, --download_location: Путь для сохранения загруженных файлов (необязательно, по умолчанию текущая директория).

Примеры

Загрузка одного файла

python yandown.py -l "https://disk.yandex.ru/i/example1" -d "/path/to/save"

Загрузка из файла

python yandown.py -f "/path/to/links.txt" -d "/path/to/save"

Загрузка одного файла в текущую папку

python yandown.py "https://disk.yandex.ru/i/example1"

About

A script to download files from Yandex Disk using public links. Supports single links and batch downloads from a text file.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%