[ANN] New client script using Google AJAX Search API

20 views
Skip to first unread message

livibetter

unread,
Aug 24, 2010, 9:28:58 PM8/24/10
to Blogger Related Posts Service
I am happy to announce that we have an alternative option to get
related posts. The new client script is named "gas.js"

You can read the detail at its wiki page:
http://code.google.com/p/brps/wiki/UsingGoogleAJAXSearchAPI
and my installation on my blog: http://blog.yjl.im/2010/08/using-brps-new-method-to-get-related.html

Here is a quick facts:

Pros:

* It's faster. Because it do not use BRPS database, therefore BRPS do
not need to search for labels via Blogger API. It directly uses Google
Search with labels as search keyword.
* It supports multi-blog, even multi-site, because it uses Google
search operator site:example.com | site:someblog.blogspot.com | ...
* It can now work on any page of your Blogger blog, but it will use
all labels from that page to do the search. In other words, the search
keywords can come from labels of different posts on that page which
user is visiting. It will only use top 20 frequent label to query.
* No Key required! No blocking!

Cons:

* Since the result are Google Search results, therefore, un-indexed
page will never show up in related list until it's archived by Google.
If you just publish new post, then it may not show up in other post's
related list right away.
* Only up to 8 results. Though Google AJAX Search API provides
paging, but it will not try to grab results from second page.

I am looking forward to hearing your thoughts, suggestions!

livibetter

unread,
Sep 11, 2010, 6:58:29 AM9/11/10
to Blogger Related Posts Service
gas.js updated.

Now, the results is no longer capped to 8 only, but up to 20 results.
More, you can now remove archive pages and home pages of blogs, or any
URL by using a new parameter

...
exclude_url_regexp: /(.*archive\.html|blog\.example\.com\/$|
(blog1name|blog2name|blog3name)\.blogspot\.com\/$)/,
...

----

Detail about results amount `limit` lift:

Now the gas.js will request up to 5 times to Google AJAX Search API,
each time returns 8 results, therefore 40 results from Google. With
new URL exclusion `execlude_url_regexp`, some may be removed, but it
should be sufficient to provide more than 20 results.
Reply all
Reply to author
Forward
0 new messages