opsdisk / yagooglesearch

Yet another googlesearch - A Python library for executing intelligent, realistic-looking, and tunable Google searches.
BSD 3-Clause "New" or "Revised" License
249 stars 43 forks source link

unnecessary data #27

Closed amad3us47 closed 1 year ago

amad3us47 commented 1 year ago

I need just to fetch the urls of sites

opsdisk commented 1 year ago

Hi @amad3us47 - Try setting verbose_output to False

import yagooglesearch

query = "site:github.com"

client = yagooglesearch.SearchClient(
    query,
    tbs="li:1",
    max_search_result_urls_to_return=100,
    http_429_cool_off_time_in_minutes=45,
    http_429_cool_off_factor=1.5,
    # proxy="socks5h://127.0.0.1:9050",
    verbosity=5,
    verbose_output=False,  # False (only URLs) or True (rank, title, description, and URL)
)
client.assign_random_user_agent()

urls = client.search()

len(urls)

for url in urls:
    print(url)
opsdisk commented 1 year ago

@amad3us47 Did that work for you?

amad3us47 commented 1 year ago

Yeah it did!!