mardi 26 avril 2016

python web scraping gnp package

I came across the page. Based upon it i wrote the below code. The code runs. I want some additional results. Any suggestions or alternate package that you can suggest? I am creating word1 because i want to search for "eric bledsoe"/bigram and not ("eric","bledsoe")

import gnp
word= 'eric bledsoe'
word1='"' + word + '"'
c = gnp.get_google_news_query(word1)
#c = gnp.get_google_news_query("What's happening on earth")
print (c)

  1. How can i get a timestamp (6 hours back, Apr 25, 2016‎ etc) that is associated with each news?
  2. How can i restrict to news that were published in last 365 days?
  3. How can i take only top x entries? for example i want to see top 1000 results only? How can i navigate through 2,3,4....google news page?



Aucun commentaire:

Enregistrer un commentaire