Google News RSS Scraping - OpenDemocracyManitoba/winnipegelection GitHub Wiki
Old ManitobaElection.ca Search URL String
'http://news.google.ca/news?pz=1&cf=all&ned=ca&hl=en&as_maxm=3&q=' +
'"Candidate Name" location:winnipeg' +
'&as_qdr=a&as_drrb=q&as_mind=25&as_minm=2&cf=all&as_maxd=27&scoring=r&output=rss&num=50'
GET Parameters Used
pz=1
- Unknown
cf=all
- Retrieve all content (deprecated) Was in the url twice.
ned=ca
- restrict to Canadian edition
hl=en
- language is english
q=
- the actual search query. We append 'location:winnipeg' to all queries to search source location of news.
as_drrb=q
- Retrieves articles added at any time when used with as_qdr=a
.
scoring=r
- sorts search results. Default: "r". Alias: "as_scoring"
r
by relevancen
by date (newest first) (We use to use n. It stopped working.)d
by date (newest first) with duplicateso
by date (oldest first)
output=rss
- atom also possible
num=50
- Number of results 1 to 100.
To be removed as they only work with as_drrb=b
:
as_maxm=3
- Only the last three months (1 - 12)as_mind=25
- Minimum dayas_minm=2
- Max monthas_maxd=27
- Max day
New Simplified Search Query
'http://news.google.ca/news?ned=ca&hl=en&as_drrb=q&as_qdr=a&as_nloc=winnipeg' +
'&scoring=r&output=rss&num=50&q="Candidate Name"'
New GET Parameters Used
ned=ca
- restrict to Canadian edition
hl=en
- language is english
q=
- the actual search query. We append 'location:manitoba' to all queries.
as_drrb=q
- Retrieves articles added at any time when used with as_qdr=a
.
scoring=r
- sorts search results. Default: "r" which is by relevance.
output=rss
- atom also possible
num=50
- Number of results 1 to 100.
as_nloc=winnipeg
- Restrict the source location of the news. Equivalent to appending location:winnipeg to the q
vaule.
Candidates with multiple names.
If a candidate has more than one name used by the media we can use the boolean OR
operator in the q
search value. This will mean adding another column to the people name.
Restricting Source Location Doesn't Work
Restricting source location using as_nloc
or location:winnipeg
does not work anymore in RSS based results, leading to lots of false positives.
There is also a geo=winnipeg
query option, but it may result in the loss of some valid articles. More research is required to see which valid articles the geo
flag is dropping.
Geo Parameter Investigation
I ran a query for Harvey Smith with and without the query parameter "geo" being set to "winnipeg".
Note that the "geo" query has no false positives, and includes five articles missed by the "no-geo" query. Even though the "no-geo" query was full of false positives it actually found five valid articles missed by the "geo" query!
Looks like the geo results are only Freep and Wpg Sun. The non-geo query has results from the Metro, ChrisD and CTV in addition to Freep and Sun.
Ruby script and RSS files used to investigate.
geo=winnipeg
Search for "Harvey Smith" with
- Audit aftermath - Winnipeg Free Press
- Consultants defend report under grilling - Winnipeg Free Press
- City to province: review audit - Winnipeg Free Press
- Katz's plan to revamp EPC passes - Winnipeg Sun
- Gloves off over city hall audit - Winnipeg Free Press
- Candidates register to run for city council - Winnipeg Free Press
- A change gonna come to Winnipeg city council - Winnipeg Sun
- Council votes no to rapid transit referendum - Winnipeg Sun
- Council votes to reform EPC selection - Winnipeg Free Press
geo=winnipeg
Results
Only in - Consultants defend report under grilling - Winnipeg Free Press
- City to province: review audit - Winnipeg Free Press
- Katz's plan to revamp EPC passes - Winnipeg Sun
- Gloves off over city hall audit - Winnipeg Free Press
- Candidates register to run for city council - Winnipeg Free Press
geo=winnipeg
Search for "Harvey Smith" without
- Audit aftermath - Winnipeg Free Press
- Dishonored 2 Rumors Suggest New Protagonist, Time Setting - SegmentNext
- Top 25 Xbox 360 Games - Game Informer
- Council to send real estate audit to Manitoba Justice for review - MetroNews Canada
- Auditors stand by methods - Winnipeg Sun
- Possible Dishonored 2 Details Leaked, New Setting and Main Character Hinted At - Only Single Player
- Long awaited real estate audit lands at city hall - CTV News
- Dishonored 2 Details Revealed By Insider - NowGamer
- Shaktoolik “takes own fate” to protect community, buy time from relocation - Ktoo
- Council votes no to rapid transit referendum - Winnipeg Sun
- Council candidates begin to register - Winnipeg Sun
- Shaktoolik “Takes Own Fate” To Protect Community, Buying Time From Relocation - Knom (blog)
- A Locavore Meat Market Expands to Shelburne - Seven Days
- Daybook: Recent births in the Jackson County area - The Jackson Citizen Patriot
- A change gonna come to Winnipeg city council - Winnipeg Sun
- City Councillors Get a Say on EPC Appointees - ChrisD.ca
- Pittsburgh Passion GameDay: Battle Of The Unbeatens In Playoff Matchup - City of Champions
- Council votes to reform EPC selection - Winnipeg Free Press
- Milestone: PEO raises $1300 - Sequim Gazette
- A Day Away at Ladew Topiary Gardens - Reading Eagle
- Blogging Alzheimers - New Jersey Jewish Standard (blog)
- Judge orders mediation for feuding Duncanville officials - Dallas Morning News
- County to feature four House races and one primary - Addison County Independent
- Success for Duffin - Glasgow South and Eastwood Extra
- Relay Teams Fall Short On Day Two Of NCAA Championships - Notre Dame Official Athletic Site
- Dishonored II: Darkness of Tyvia - De nouvelles rumeurs sur le jeu - GAMERGEN
- Dishonored 2: Darkness of Tyvia - Angeblich neue Details geleakt - GameZone
- Kolejne plotki o Dishonored 2 - gram.pl
- Dishonored 2: un insider svela numerosi dettagli - Games.it
###Only in Non-geo=winnipeg
Results
- Dishonored 2 Rumors Suggest New Protagonist, Time Setting - SegmentNext
- Top 25 Xbox 360 Games - Game Informer
- Council to send real estate audit to Manitoba Justice for review - MetroNews Canada
- Auditors stand by methods - Winnipeg Sun
- Possible Dishonored 2 Details Leaked, New Setting and Main Character Hinted At - Only Single Player
- Long awaited real estate audit lands at city hall - CTV News
- Dishonored 2 Details Revealed By Insider - NowGamer
- Shaktoolik “takes own fate” to protect community, buy time from relocation - Ktoo
- Council candidates begin to register - Winnipeg Sun
- Shaktoolik “Takes Own Fate” To Protect Community, Buying Time From Relocation - Knom (blog)
- A Locavore Meat Market Expands to Shelburne - Seven Days
- Daybook: Recent births in the Jackson County area - The Jackson Citizen Patriot
- City Councillors Get a Say on EPC Appointees - ChrisD.ca
- Pittsburgh Passion GameDay: Battle Of The Unbeatens In Playoff Matchup - City of Champions
- Milestone: PEO raises $1300 - Sequim Gazette
- A Day Away at Ladew Topiary Gardens - Reading Eagle
- Blogging Alzheimers - New Jersey Jewish Standard (blog)
- Judge orders mediation for feuding Duncanville officials - Dallas Morning News
- County to feature four House races and one primary - Addison County Independent
- Success for Duffin - Glasgow South and Eastwood Extra
- Relay Teams Fall Short On Day Two Of NCAA Championships - Notre Dame Official Athletic Site
- Dishonored II: Darkness of Tyvia - De nouvelles rumeurs sur le jeu - GAMERGEN
- Dishonored 2: Darkness of Tyvia - Angeblich neue Details geleakt - GameZone
- Kolejne plotki o Dishonored 2 - gram.pl
- Dishonored 2: un insider svela numerosi dettagli - Games.it