[Python] pytrends Error: The request failed: Google returned a response with code 404

Discussão em 'Python' iniciado por Stack, Fevereiro 27, 2025.

  1. Stack

    Stack Membro Participativo

    whene i try to get the trend searches in use it give this error: the request failed: google returned a response with code 404

    this is the code:

    import pytrends from pytrends.request import TrendReq pytrends = TrendReq(hl='en-US', tz=360)

    countries = ['united_states', 'kuwait', 'qatar'] def trending_searches(country): data = pytrends.trending_searches(pn=country) print(data)

    country = 'kuwait' trending_searches(country)

    for country in countries: print(f'trend searches for: {country}') trending_searches(country)

    i'am try to get the trend search from pytrend api

    Continue reading...

Compartilhe esta Página