This script is designed to download and convert videos from the pornographic website "jieav.com". It utilizes Selenium for web navigation, BeautifulSoup for HTML parsing, and FFmpeg for video conversion. The script can be configured to search for specific keywords, download a limited number of videos, and handle both M3U8 and MP4 video formats.
- Web Scraping: Uses Selenium and BeautifulSoup to navigate and parse HTML pages.
- Video Download: Supports downloading both M3U8 and MP4 video formats.
- Video Conversion: Converts M3U8 streams to MP4 using FFmpeg.
- Keyword Filtering: Allows specifying positive and negative keywords to filter video downloads.
- Progress Tracking: Utilizes
tqdm
for displaying download and conversion progress.
- Python 3.x
- Selenium
- BeautifulSoup
- Requests
- FFmpeg
- Tqdm
- WebDriver Manager
-
Clone the Repository
git clone https://github.com/ystemsrx/Porn-Video-Scraper cd VideoScraperDownloader
-
Install Python Dependencies
pip install selenium beautifulsoup4 requests tqdm webdriver-manager
-
Install FFmpeg
- Windows: Download from FFmpeg.org and add to PATH.
- Mac:
brew install ffmpeg
- Linux:
sudo apt-get install ffmpeg
- Positive Keywords: Add keywords to
positive_keywords
list to include videos that match these keywords. - Negative Keywords: Add keywords to
negative_keywords
list to exclude videos that match these keywords. - Search Keywords: Add search terms to
search_words
list to search specific videos. - Download Limit: Set
download_limit
to control the number of videos to download (0 for unlimited).
- Set Configuration: Update the script with your desired configuration for keywords, download limit, and other settings.
- Run the Script:
python Porn-Video-Scraper.py
This script also includes a GUI version for easier use. The GUI allows you to configure settings, start downloads, and monitor progress through a user-friendly interface. Run python Porn-Video-Scraper-GUI.py
.
Downloads and converts M3U8 streams to MP4.
Fetches the duration of an M3U8 stream.
Parses duration from FFmpeg output.
Processes a webpage to find and download videos.
Downloads a file from a given URL.
Searches for videos based on a keyword and processes the results.
Main function that initializes the web driver and starts the download process.
The script uses Python's logging
module. Log level is set to ERROR
to minimize log output. Adjust log level as needed for debugging.
If you are accessing this script from mainland China, a VPN is required to reach the target website and download the videos.
This project is licensed under the MIT License. See the LICENSE file for more details.
This script is intended for educational purposes only. The user is responsible for complying with all applicable laws and regulations regarding the downloading and use of content from the internet.