Solve Ratelimit
QIN2DIM opened this issue · comments
Add (Faker) Headers
async def main(keywords: str):
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:124.0) Gecko/20100101 Firefox/124.0"
}
results = DDGS(headers=headers).text(keywords, max_results=5)
print(results)
return text
As a rule, you do not need to specify headers.
Requests already contain headers that mimic the browser.