This project includes two scripts: one for downloading videos from YouTube and the other
for downloading photos from Instagram. Both scripts process URLs from the urls.txt file,
where each URL points to a YouTube channel or Instagram profile.
- Ensure that you have Python 3.12.0 or later installed.
- Create and activate a virtual environment:
For Windows:
For Unix:
python -m venv venv venv\Scripts\activate
python -m venv venv source venv/bin/activate - Install the required dependencies from the
requirements.txtfile:pip install -r requirements.txt
To avoid warnings about ffmpeg not being found, you should install it. Follow the
instructions for your operating system:
- For macOS: Use Homebrew:
brew install ffmpeg
- For Ubuntu/Debian:
sudo apt update sudo apt install ffmpeg
- For Windows: Download and install
ffmpegfrom the official website.
Add the YouTube channel URLs and Instagram profile URLs you want to process
to the urls.txt file. Each URL should be on a new line. Example content:
https://www.instagram.com/diachenko.tattoo/
https://www.youtube.com/@user-me5tu9kk1t
To run the YouTube parser script, execute the following command:
python youtube_parser.pyThe script will process all URLs containing youtube.com or youtu.be and download videos from
the listed channels.
To run the Instagram parser script, use the following command:
python instagram_parser.pyThe script will process all URLs containing instagram.com and download photos from the listed
profiles.
- YouTube Parser: The downloaded videos are saved in folders named after the channel. Each
folder contains a
description.txtfile with channel information. - Instagram Parser: The photos are saved in folders named after the profile. Each folder
contains a
description.txtfile with profile information and aphotos.txtfile listing the downloaded photo URLs.
To ensure the code follows PEP8 standards, use pylint. For example:
pylint --disable=missing-module-docstring,missing-function-docstring,pointless-string-statement youtube_parser.pyYou can similarly check the Instagram script.
Make sure to use the scripts in compliance with the terms of service of YouTube and Instagram.