pdf_hunter
Search for and download PDF file links from a webpage.
Installation
pip install pdf_hunter
Usage
import pdf_hunter
url = "https://github.com/EbookFoundation/free-programming-books/blob/master/free-programming-books.md"
pdf_urls = pdf_hunter.get_pdf_urls(url)
pdf_urls[:10]
['https://people.gnome.org/~swilmet/glib-gtk-dev-platform.pdf', 'https://www.math.upenn.edu/~wilf/AlgoComp.pdf', 'http://cslibrary.stanford.edu/110/BinaryTrees.pdf', 'http://www-inst.eecs.berkeley.edu/~cs61b/fa14/book2/data-structures.pdf', 'http://lib.mdp.ac.id/ebook/Karya%20Umum/Dsa.pdf', 'http://cslibrary.stanford.edu/103/LinkedListBasics.pdf', 'http://cslibrary.stanford.edu/105/LinkedListProblems.pdf', 'http://www.jjj.de/fxt/fxtbook.pdf', 'http://www.cs.cmu.edu/~rwh/theses/okasaki.pdf', 'http://igm.univ-mlv.fr/~mac/REC/text-algorithms.pdf']
We can download a single PDF file from a given url
pdf_url = pdf_urls[0]
pdf_url
'https://people.gnome.org/~swilmet/glib-gtk-dev-platform.pdf'
file_name = pdf_hunter.get_pdf_name(pdf_url)
file_name
'glib-gtk-dev-platform.pdf'
import os
os.path.isfile(file_name)
False
pdf_hunter.download_file(pdf_url, folder_path=os.getcwd())
os.path.isfile(file_name)
True
Or download all PDF files from the page
pdf_hunter.download_pdf_files(url, folder_path=os.getcwd())
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pdf_hunter-1.0.0.tar.gz.
File metadata
- Download URL: pdf_hunter-1.0.0.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9edde221380c800aa6ff99fe5c98b0922793656c964bdb4263f343250afd21a0
|
|
| MD5 |
0291930aa1cadd0f88087951807ee18a
|
|
| BLAKE2b-256 |
7f698af2f7dee1b3e9ffb75ffe6f97d823c03476f2272d7c0e348f255db06b4d
|
File details
Details for the file pdf_hunter-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pdf_hunter-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f040520974528c95873ea156d0d73d068b03e7c95b4a7bb939f5b913d353afeb
|
|
| MD5 |
3c110732e80e860ae27ad530d33877b6
|
|
| BLAKE2b-256 |
2d3026d722054243c16605738b383599e2c0358c2b1134c7657149a6492a7ed8
|