Feed read based on URL - feedparser

I have a different problem here. Have to develop a iphone app, in which it is going to show event updates from feeds.
If the feed list is too large(I mean the xml size) then it took very long time to return the result. Instead of that can i able to get only what i want.
Eg:
http://www.ted.com/talks/rss
This returns all top ted talks, but here can i read only one talk based on talk video id like this http://www.ted.com/talks/rss?~3/6dqCdBTpEn0/1019.

Related

How to get public data from Google plus

I have a project that involves having public data downloaded from Google plus, can you give me a reference on how I can download like 1 GB of any type of public data from Google plus?
The data can be posts or circles information. I've tried to work with developer tools but the far I got is downloading my own profile information but what I need is public data.
Thanks !
There is no truly "public" data on Google+.
Every stream is unique to a user.
Try viewing the site without logging in, and you'll see what I mean.
Since users have the ability to block other users from viewing even their "public" posts, before Google shows you a post they check to see if you're on the blocked list. For them to be able to do that, you have to be logged in.
Your best bet would be to create a dummy account and only look at your nearby stream or What's Hot.
Otherwise you'd need to circle users, and that would create the stream. G+ is not like twitter. There's no firehose to speak of.
To programmatically cull data, you would have to use their API, but even then their HTTP API limits you to 20 results per search and you have to provide a query.
You could get up to 100 results per user if you picked individuals and got their userids, but again there's not a programmatic way to get a bulk dump.
You could randomly select users by using an activity search for a dictionary entry, and then seed that into the activity listing api... something like (in pure pseudocode)
for Random word in dictionary
group = userids from GET https://www.googleapis.com/plus/v1/activities?query=[word]
for userid in group
GET https://www.googleapis.com/plus/v1/people/[userid]/activities/collection/public
Actual code would of course depend on the language.

What is the maximum results returned for YouTube Data API v3 call

Context
I am in the process of providing some consultancy on doing a HTTP GET using YouTube Data API V3; in order to develop a Windows based application to GET a list of results from Youtube, for say a specific CATEGORY, or a specific TAG.
We are open to using any programming language(I'm from a C++ background and am hoping You tube will support direct HTTP connections without using Google client SDK and so on) to connect to YouTube and (HTTP) GET data.(Once a month or so, so YouTube API quotas should not be problem).
The Issue
We are being told by some of my client's web developers that YouTube API v3 will only return a maximum of 500 records/results, for say a query that returns JUST the Total viewers, the Video's link, and basic meta data such as that.
S, say I wish to find 5,000 results for category "House music" or "basketball" - and I have the Developer Key etc are all set up, would that be possible?
If so, what GET fields would I need to populate(such as "max_results_per_page")?
Thank you.
The API won't provide more than ~500 search results for any arbitrary query. It's by design. Technically, it means that the nextPageToken field won't be returned once you hit ~500 results. No additional parameter can change that.
If you want more than ~500 results for a query, you have to split it into more specific sub-queries. I'd suggest using the publishedAfter and publishedBefore parameters to achieve that, but feel free to experiment with the other ones here.
This only holds for the search-Query. Other queries like "PlaylisItem:list" deliver more results. I have tested with 100.000 items to get the videos of a playlist.

Instagram: sort photos with a specific tag with most likes

I'm running a contest on the web where the image with the most likes wins. It's tiresom having to go through 900 images manually so what I want to do is, sort all images with the tag lets say #computer after the amount of likes, with the most liked pics on top. I have searched the net like crazy for some program or site that does this (ExtraGram, gramhoot, statigram, webstagram) but none offer to sort by amount of likes and it drives me INSANE! It's a really relevant request.
I've tried istafeed.js but it doesn't include all images, actually it leaves out the ones with the moest likes which defies the purpose.
There's nothing I know of in the Instagram API that sends back media sorted by likes in advance. I don't think there's a tool to do this either, but writing one is relatively simple IMO and I've done it before for a contest specifically.
The simplest thing to do is to do the following:
Use the Instagram API (via a library or pure REST) to query by tag. For instance, if you only care about the most recently tagged media or you want to process by date, you can use the [/tag/tag-name/media/recent][1] enpoint.
Page through each result page by processing the next_max_id/next_max_tag_id.
Collect the results locally into a database. You will receive the "like" count for each media item. You will have to update the data if you want to track the likes over time.
Sort the results using your database or if it's a small result set, you could skip #3 and just sort in memory.
If you need to refresh the results, you need to subscribe to the Tag via the API. You can give Instagram a URL to then push updates, and then you'll have to retrieve 1 or media items and update them in your database accordingly.
You will of course need to register your application with Instagram to get an API key if you want to do this. Then you can either send them your client_id or use OAuth.
The best way to achieve this is to pull the photos in and then sort them programmatically based on the likes numeric value. I've designed a plugin that does this automatically for you for anyone interested.
Instagram Journal

Search Apple App store by genre with iOS/Obj-c

How would you use Obj-c to search the Apple App store to do the following...
Return the details of the top 100 in the games overall category or a
specific games category
Return the details of a specific games in the games category
Anyone?
Well, as far as I know you have two methods to search the App Store:
Search API;
RSS feed generator.
There are many differences between those but the most relevant for your example is that with the Search API you cannot sort the results as they come sorted by relevance and it requires always a search term. The RSS feed generator already has Top Free, Top Paid and Top Grossing categories for you.
Given this I'm going to start answering your question for the RSS feed generator.
You use the RSS feed generator to generate feeds like this for the top 100 free games in the US store: https://itunes.apple.com/us/rss/topfreeapplications/limit=100/genre=6014/xml;
Take a loot at this link to get games sub genres;
You use NSXMLParser library to parse the RSS which already includes the app details.
You may use the initWithContentsOfUrl: method of NSXMLParser;
A quick how-to for this part can be found here.
You can also use StoreKit to get the details of the apps by their ID or show a modal view controller with a specific app but that will require an extra network request.
For the sake of completeness I'll also cover how you can use the Search API.
Use the Search API to create a URL that describes your search:
A URL like this allow you to search for apps with that matches "angry birds" - https://itunes.apple.com/search?term=angry+birds&media=software.
Process the results using NSJSONSerialization library. That already includes the app details.
Take a loot at this tutorial on how to use the NSJSONSerialization library.
In the end, as #Numan said, this two methods accomplish different things. You said you wanted to have the top 100 games from a specific category and also said you needed to search for a specific game.
You can use my descriptions to create one class that interacts with the App Store in these two ways and return an object defined by you that describes an app (or an array of objects).
You can access this info by RSS, look here http://www.apple.com/rss/
Also you can generate RSS feed http://itunes.apple.com/rss/generator/

YouTube Playlist API no longer functioning?

According to YouTube's docs:
https://developers.google.com/youtube/2.0/developers_guide_protocol_playlists
I can go to the following URL to retrieve a list of videos in a youtube playlist:
https://gdata.youtube.com/feeds/api/playlists/8BCDD04DE8F771B2?v=2
Works well right? Well no... I've been unable to find a single playlist that actually works besides the one supplied by youtube. I have a playlist here: http://www.youtube.com/playlist?list=PLABD2A8CE079F70FA. It would be logical that if I simply take the ID of the playlist and plug it into the gdata URL, it should return valid data, correct? Nope... doesn't work:
https://gdata.youtube.com/feeds/api/playlists/PLABD2A8CE079F70FA
It appears that the API doesn't work with any playlist that starts with their new "PLA" format. What do I need to do, to get the youtube API working with the new playlist system?
Well I figured it out. The playlist API is designed with the OLD Youtube Playlist IDs in mind, the ones without the "PL" at the start. So if you want to retrieve information about the videos in a playlist, you need to drop the PL from the Playlist ID and then it will work fine...
Example:
https://gdata.youtube.com/feeds/api/playlists/ABD2A8CE079F70FA
VS:
https://gdata.youtube.com/feeds/api/playlists/PLABD2A8CE079F70FA
You can add query parameters to the url. With the max-results query you can fetch a maximum of 50 results. If you want more than 50 requests, you need to call this multiple times with start-index query.
https://gdata.youtube.com/feeds/api/playlists/PLABD2A8CE079F70FA?v=2&max-results=50 will give maximum of 50 results. Fetch the next 50 results by adding the query start-index=51&max-results=50. Currently this is the only way you can achieve it.
Check this your playlist,It works fine
http://gdata.youtube.com/feeds/api/users/Jaxelrod/playlists/DC725B3F130398B2?v=2