This script allows users to input a URL of an article or webpage and download its content as a PDF.
The script leverages the following Python libraries:
pdfkit: A Python wrapper for converting HTML to PDF using the webkit rendering engine andwkhtmltopdf.requests: To send HTTP requests and validate the given URL.os: To interact with the operating system.
Dependencies:
pdfkitrequests- Additionally, the
wkhtmltopdfcommand line tool must be installed and available in the system's PATH forpdfkitto function properly.
- URL validation to ensure the provided link is accessible.
- Converts a valid webpage or article URL to a downloadable PDF.
- Basic error handling for better user experience.
- Clone this repository: git clone https://github.com/Bisalkumar/Article-Downloader.git
- Navigate to the directory containing the script.
- Install the necessary Python libraries: pip install pdfkit requests
- Ensure that
wkhtmltopdfis installed and available in the system's PATH.
- Run the script: python Article_Dwonloader.py
- Enter the URL of the article or webpage when prompted.
- If the URL is valid, the content will be downloaded as a PDF named
output.pdfin the current directory.
Contributions are welcome! Please fork this repository and create a Pull Request with your changes.
This project is licensed under the MIT License - see the LICENSE.md file for details.
- Developers of
pdfkitandrequestsfor their amazing libraries.
.png)
.png)