0

I am trying to understand Google news parameters. Would anyone have an example of how to use these parameters?

I got these from the link posted in the pset however no examples on how to use them were provided.

Any help is appreciated.

  • q=TERMS retrieve results with all of the terms. Alias: as_q
    • as_epq=TERMS retrieve results with the exact phrase
    • as_oq=TERMS retrieve results with at least one of the words
    • as_eq=TERMS retrieve results without the terms
    • as_qdr=dTERMS retrieve results within specified number of days example &as_qdr=d1 results within one day
    • as_qdr=wTERMS retrieve results within specified number of weeks example &as_qdr=w1 results within one week
    • as_qdr=yTERMS retrieve results within specified number of years example &as_qdr=y1 results within one year
1

You aren't expected to use any of those. The lookup function in helpers.py will create the feed (with this line

feed = feedparser.parse("https://news.google.com/news/rss/local/section/geo/{}".format(urllib.parse.quote(geo, safe="")))

and your articles function in application.py should simply call lookup and return the json list.

You then use that in your scripts.js to populate the marker's InfoWindow.

1
  • Hi @curiouskiwi, I appreciate your assistance as always. I realize that I'm not expected to use those terms but would like to challenge myself beyond the requirements of the course. Thank you! – Salamit Nov 15 '17 at 9:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .