i'm using google news to get news RSS by postal code
now i need to add pagination
or to get it from 1 day ago, 2 days ago ...
so far im using that url
https://news.google.com/news?geo=99553&output=rss
what i need for example is
https://news.google.com/news?geo=99553&output=rss&page=5
to get the 6th page of the news
Related
I am using Blogger API to insert posts. Go through the following blog to understand the problem:
Link: https://post-testing123.blogspot.com/
In this blog I have 7 posts:
5 posts with title of format 'Title #no'- are created with API request.
2 posts with title of format 'Manual #no'- are created manually.
Manual posts were created before API posts.
In this blog, I have set the number of posts to be displayed on the main page to 3.
So, on main page 3 out of 5 posts created with API are visible.
On clicking on Older, only the 2 manual posts are displayed and the 2 API posts left are not displayed.
In archives all 7 posts are displayed.
And if I set the number of posts to be displayed on the main page to a large number like 30.
Then, all 7 posts are displayed correctly.
I have tried changing the theme but it doesn't work.
I found the reason for this, it is a bug in Blogger.
It occurs when two or more posts have same timestamp (Same minute, not same seconds or milliseconds).
So, when you post using API (especially using Google Apps Script), a lot of your posts are likely to have the same the timestamp.
Something similar is stated here:
https://support.google.com/blogger/thread/2238679?hl=en&authuser=0
Hope it helps.
I have been trying get google news for the past month and the past year.
I have tried the following url but I cannot figure out what is the date parameter and what should be passed to it.
http://news.google.com/news/section?cf=all&ned=us&q=healthcare&num=10&output=rss
http://news.google.com/news/feeds?hl=en&q=healthcare&ie=utf-8&num=10&output=rss
According to the source:
as_qdr=m past month
as_qdr=y past year
Notice that due to Google News API is deprecated, maybe some parameters are no longer functional.
Check also this answer on Stack Overflow and its comments for get even more info about Google News API.
I want to put Google+ badge of a business on my page. I can get code for it using Google Developer website: https://developers.google.com/+/web/badge/#badge
But i do not understand how to get average score and number of reviews so I can feature them on my website as well - something similar to what you get when you search for a place:
for example, here is a restaurant's Google+ page: https://plus.google.com/106659611775440325701/about?hl=en - it clearly displays all those reviews and scores. How to get this information from Google? Is there a way to modify badge's code to include them?
Reviews data is part of the Places API. There are a couple of options for getting them on your site.
The Maps Embed API would be the easiest but requires loading a map on your page.
Using the Maps JS API v3 you can load and render place details client side.
Using the HTTP API you can load details on your server to cache in a DB and render on page load.
UPDATE May 2019: it is possible now to get total number of reviews using Place Details Place APIs call: https://developers.google.com/places/web-service/details#fields
as of Jan 2019, it returns user_ratings_total field: https://developers.google.com/maps/documentation/javascript/releases#335
so looking at this again 3 years later, we still can't get all reviews for a place. We can get some - top 5 - using Place Details API call: https://developers.google.com/places/web-service/details
then there is a change request for Google team to extend this: https://issuetracker.google.com/issues/35825957
And finally, you can apply for Google Business Account and request access to extended API which allows you to get all reviews for a verified location: accounts.locations.reviews.list
This may well be documented somewhere obvious, but I'm not seeing it. I'm parsing Google News results from RSS, but I'm struggling to get the RSS feed to match what I'm seeing online, with results limited to my country.
I'm in South Africa. To see SA news on a topic, I search for the topic in Google News, then select "Pages from South Africa" in the left menu. Although that option is under "The web", it does limit the news results as well.
However, the RSS link in the page footer goes to the generic (ie: not region-specific) news results as if I hadn't selected "pages from..." at all. I've been playing with the parameters in the feed URL, but I haven't found any way to get it to restrict the RSS results to my region. (Similarly: can't find an option to limit a CSE - custom search engine - the same way).
Any ideas?
Update: looks like it can't be done - the RSS URL doesn't obey the same rules as the regular searches ("&cr=countryZA"). Manipulating the query string to get the result, and scraping the results out, is in defiance of Google's Ts&Cs.
you can use &geo=usa or even use zip code like &geo=99553
It can be done like so: https://news.google.com/news/feeds?country=AU?geo=2000
The above URL would limit the RSS output to news in Sydney, Australia.
I want to fetch the last week top tracks of an artist using the last.fm API but I don't see any relevant method call for that.
I looked at artist.getTopTracks method but it returns the overall top tracks of an artist.
So, is there any way I can fetch just the last week top tracks using the API.
Unfortunately no way to get this info via their API. Bit strange indeed as the last week top tracks chart is listed default on an artist page at the last.fm website. So you have to use some good old web scraping techniques.