Google Search

GRATIS CON POSSIBILITÀ DI UPGRADE
Verified
Da apigeek | Aggiornamento 14 giorni fa | Data
Popolarità

9.9 / 10

Latenza

589ms

Livello di servizio

100%

Torna a tutte le discussioni

This Solution is not working

Please See this pattern is not working for me …
still showing 2021 , and 2022 results

Please solve it

https://colab.research.google.com/drive/12zkfL15lpFInA2YkD-5RhWi_JM2F0WYc?usp=sharing

avatar
apigeek commented 4 mesi fa

Sorry about that. The exact format is:

query = {
	"q": query_temp ,
	" before:": "2010-01-01",
	" after:": "2010-01-02"
}

Notice the extra space in front and semicolon after before and after. The date format should not change.

avatar
sohailkhan2k30-7DEVdbHz7bM commented 4 mesi fa

But the results are still same , still showing 2021 , 2022 data

https://colab.research.google.com/drive/12zkfL15lpFInA2YkD-5RhWi_JM2F0WYc?usp=sharing

avatar
apigeek commented 4 mesi fa

Wait this doesn’t seem to work either. We believe the API has changed. We are investigating what is happening.

avatar
sohailkhan2k30-7DEVdbHz7bM commented 4 mesi fa

Yup Please , i am waiting for your reply , Thanks

avatar
apigeek commented 4 mesi fa

It looks like Google removed the ability to specify the date range. Please see discussion here: https://support.google.com/googlenews/thread/688982/how-can-i-search-news-articles-in-a-date-range?hl=en&msgid=691627

avatar
sohailkhan2k30-7DEVdbHz7bM commented 4 mesi fa

but if you see , on google news , there is an option of custion range , in tools

avatar
apigeek commented 4 mesi fa

We will have to get our developers to add support for this.

avatar
sohailkhan2k30-7DEVdbHz7bM commented 4 mesi fa

if this feature is removed then how i can use it by manually , if i can use it manually , then i m sure , there is some way to use it by automatically

avatar
sohailkhan2k30-7DEVdbHz7bM commented 4 mesi fa

Thank you Dear ❤️

avatar
apigeek commented 4 mesi fa

Also we were able to update the engine to support this use case. The method of searching you’ve mention is different from how Google News API works. So instead of using the /news/ API try using the /search/ API instead. Format the query as followed:

 query = {
  "q": "machine learning before:2019-01-01 after:2018-01-01",
  "tbm": "nws"
}

Again the URL should be url = f'https://google-search3.p.rapidapi.com/api/v1/search/{urllib.parse.urlencode(query)}'

Let us know if this works.

Partecipa alla discussione - aggiungi un commento di seguito:

Accedi/Iscriviti per pubblicare nuovi commenti
Valutazione: 5 - Voti: 2