Join the conversation

Join the community of Machine Learners and AI enthusiasts.

Sign Up
luigi12345 
posted an update Nov 24, 2024
Post
3716
MinimalScrap
Only Free Dependencies. Save it.It is quite useful uh.


!pip install googlesearch-python requests
from googlesearch import search
import requests
query = "Glaucoma"
for url in search(f"{query} site:nih.gov filetype:pdf", 20):
    if url.endswith(".pdf"):
        with open(url.split("/")[-1], "wb") as f: f.write(requests.get(url).content)
        print("✅" + url.split("/")[-1])
print("Done!")

In this post