Get an RSS feed's title using YQL - rss

I'm using YQL to retrieve an RSS feed using javascript (as json), for example i use the following query:
select * from rss where url = "http://feeds2.feedburner.com/ajaxian"
The response contains the feed items, already parsed as json and everything is cool so far.
Now, I also want to get the title of the entire feed (not the title of a specific item) - but it's not a part of the result (even though the original XML feed contains it).
There is the possibility of querying the original XML itself. for example:
select channel.title from xml where url = "http://feeds2.feedburner.com/ajaxian"
and it indeed returns the feed title for that specific RSS, but that query is only valid for a RSS 2.0 formatted feeds, which stores it under rss\channel\title.
What about atom feeds which store the title under feed\title ?
What about other formats?
My question is - is there any generic way to request the feed's title through YQL? maybe somehow along with the feed itself?
thanks,

You can use the feednormalizer table to convert the feed (regardless of its format) into one of the standard formats, then grab the title from the proper node for that format.
To take the Ajaxian feed, "normalize" it as Atom and get the feed title, the query would look like:
SELECT title
FROM feednormalizer
WHERE output="atom_1.0" AND url="http://feeds2.feedburner.com/ajaxian"
(Try this in the YQL console)

There are also other tables that you can use like feed, rss and atom.
Regarding your follow up question of how to find data tables:
Go to the YQL console, make sure that the Community Tables are loaded (should already be the case with this link) and then just type in the search box on the right hand side what you are looking for. Often you can find something useful.

Related

Modify Solr search query text with some condition

I have integrated Solr search with my ektron site. And for search functionality I used Search framework API.
I am getting the search results as well. Now I want my search result to display in some particluar order. ie. the result item with target url that contains the search text should come first, followed by some other contents and so on.
I came to know that by modifiying the query text that passing to the Solr can return the desired result.
eg : title:testkeyword
But I can't do the same with target url and and cant boost up items.
Do any know how to modify the query text to get the desired result.
Use dismax and edismax to get better results ,
http://wiki.solarium-project.org/index.php/V3:EDisMax_component
http://wiki.solarium-project.org/index.php/V2:DisMax_component

finding article by date code in google search appliance GSA

The Google Search Appliance goes through and finds out the date of each article when it crawls (last modified date is the default).
However, it doesn't turn up articles when you query by date code.
Is there any way to get the GSA to do this?
(We have a daily broadcast which people often search for by date code. Right now we have to manually put in the 4 most common date codes into the meta-keywords in order for them to be pulled up through a query)
Have you tried using inmeta:date as described in the Search Protocol Reference documentation?
Alternatively, if the date code is in the document content or the URL you could use entity recognition to extract it.
One way to make sure GSA is collecting the document date is to check the search results in XML format and see if tag has the date value. You can see the results in XML format by removing any proxystylesheet parameter in the URL.
If the value of tag is empty then GSA is not getting the document dates.
You can configure the document dates under Crawl and Index > Document Dates (at least at GSA version 7). We are using a meta tag approach. We put a date meta tag to each document/page and tell GSA to use this meta tag to sort the documents. The full list of options are:
URL
Meta Tag
Title
Body
Last Modified
Here are some links that helped me to find answers when dealing with a similar problem:
https://support.google.com/gsa/answer/2675414?hl=en
https://developers.google.com/search-appliance/documentation/64/xml_reference#request_sort_by_date
https://groups.google.com/forum/#!searchin/google-search-appliance-help/sort$20by$20date$20not$20working

How to use Facebook Graph api

I am using facebook graph Api for my application where i want the data of this page.
http://www.facebook.com/pages/
In this page there is option TV SHOW I want collect all information of that page.
But i didn't any graph api method for this page.
Please help me for this problem.
As far as I can tell, this isn't something you can do. It has to do with what Facebook sets as "indexable" columns in their tables. For example, the page table has a type ID and the TV SHOWS category ID appears to be 89, so you'd think you could run a FQL query such as:
https://api.facebook.com/method/fql.query?query=SELECT page_id, name FROM page WHERE type=89
or perhaps:
https://api.facebook.com/method/fql.query?query=SELECT page_id, name FROM page WHERE type='TV SHOW'
But you'll get this notice:
Your statement is not indexable. The
WHERE clause must contain an indexable
column.
Unfortunately, the only two indexable columns for WHERE statements using the page table are page_id and name. So you can only query this table for one page at a time. Which makes sense when you consider how expensive a search like that would be on billions of records.
You can do a generic graph search for "TV SHOWS" but it won't give the the results on the page index as you requested:
https://graph.facebook.com/search?q=TV%20SHOWS&type=page
The Graph API is more about introspection/connections between objects than an open search protocol.

asp.net mvc 2, select content by routing string

I am having trouble to what i should name this in the title field...
Question is. I want to select a blogpost by entering its title, like this:
http://localhost:3254/blog/2010/10/net-programming
The title of the blogpost should be ".net programming". So i have setup a route to look for a year a month and finally a string. But how should i save this in the database to be able to search for it?
Should i add a field, like id, that contains asp-programming? or should i parse the title for every search? or should i convert the title and then convert it back before displaying it to the user?
The standard method is to create a separate column in the database (usually called 'slug' or permalink) that stores the html-friendly name that may be used by Urls. Then, if the title of the post changes you would normally keep the slug the same so that anyone who has bookmarked the link can still find the post. The value us usually defaulted from the blog title, replacing spaces with - and removing any non url friendly characters.
http://en.wikipedia.org/wiki/Slug_%28web_publishing%29
There are two possible solutions I can think of
Create your own Route handler and within its code, search for the actual record in the database
Create an action method in a Controller that accepts a string parameter and call that parameter id (or whatever the default is in your MapRoutes method).

How to dynamically create rss feed?

I just created my first rss feed. it worked fine. got it validated. It is basic feed of my recent blog posts. I would like to know if i would dynamically url parameters..
feed would look like this .. http://www.website.com/feed/?category=php.rss...
should show the recent blog posts of category "php". if category changes to "jquery" should show recent posts in "jquery"
How can I build a feed with changing URL parameters or build individual feeds?
Of course.
Just get the category name of out of the query string (using whatever standard library you use for that in whatever language you are using), add that as a conditional to whatever method you use to get the data (hopefully some sort of ORM), then drop the results into whatever library you generate the RSS from, just as if it were all the entries.

Resources