I have examined the object data of a Feedzirra::Feed.fetch_and_parse() object coming from a feed. The feed I'm using is http://feeds.feedburner.com/ChrisBurnor
My issue is that if a title on this page is linked to an external site Feedzirra does not pick up on it, in this case, the entry titled "Space Colony Art from the 1970's" links to publicdomainreview.com. Yet the link itself is not present anywhere in the Feedzirra returned object.
My question: Is there a known RSS element that contains the href material from an entry title?
Or: Is there a way I can examine the xml of this feed to see if I can perhaps find where the link is going...
For the future, I might want to peer inside of these links and include their material in my feed display but for now I just want to have the link.
On the feedburner page there is a link titled "View Feed XML". When opening it and then doing a "View Page Source" in your browser, you'll see the raw XML feed. But just using wget or curl seems to be less cumbersome to me.
If you look at the raw feed, you'll see that in there is no information or link about publicdomainreview.com.
So without further processing of the feed items, you can't easily get the information you want.
Related
I am going to show a mobile version of wikipedia page in my app.
The easiest way is to use UIWebView to show mobile view page, e.g. https://en.m.wikipedia.org/w/index.php?title=White_House
However I want to make certain changes to the page:
Remove the search bar.
remove all external links in the page.
while keep all format/image/layout unchanged.
I did some search. Seems I have to retrieve all contents in json with wikipedia API and reformat everything by myself.
Any easier way?
You can load the HTML, make "Find and replace" and remove whatever you want. (Modify the HTML itself.
After that you can load the HTML into the UIWebView.
Note: This might break when wikipedia will change it's webpage structure...
I am trying to display a list of podcast channels by a particular author. When a podcast is selected, display the relevant episodes. I am able to do each independently, but can't figure out how to bridge the two.
Right now my list of podcasts by author is generated using the iTunes App Store Search API. For example, you can request
#"term" : #"twit", #"media" : #"podcast"
and it will yield all the podcast channels by the author TWiT. It includes a lot of useful metadata via JSON, such as the title, artworkUrl, etc. But no direct link to the podcast that I can find.
I can also display a list of episodes for a specific podcast by parsing the iTunes RSS Tags from a hardcoded channel link that I extract by subscribing to said podcast in iTunes, then right-clicking on it and selecting Copy Podcast URL. TWiT again as an example would yield:
http://feeds.twit.tv/kh_video_hd.xml
Where this seems to fall apart is linking the two. I can't find a way to extract the direct podcast URL from the iTunes App Store JSON metadata.
I have seen the post on Finding the URL for podcast feeds from an iTunes id, but this seems to suggest you can only do it from the Apple supplied feeds from the iTunes Store RSS Generator. It is limited to predefined criteria (e.g. Top Podcasts).
Suggestions or clarifications would be appreciated. The only path I'm seeing right now is to hard code each of the Podcasts channels from my author list.
I think I've found the key. I'm not sure if this is universal, but in the podcasts I've tested with, the JSON results include a feedUrl parameter. Which frustratingly, is not mentioned on the Search API page.
feedUrl = "http://leoville.tv/podcasts/twit.xml";
Passing the value of this feedURL parameter pulled from the search API JSON results, and parsing it as RSS seems to deliver what I need.
Right Here.
"trackViewUrl":"https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?i=120954025&id=120954021&s=143441"
I think.
How can I go about allowing users to embed YouTube and Vimeo videos in my Rails app?
I'd provide a text field or text area where users can add the link of the video they wish to embed.
Click add and have my app show a spinner while the details are being gathered.
When the details are found, I'd want them displayed on the page before user can finally submit the post.
I'm guessing the HTML, link details will need to be stored in the database so the video can automatically be displayed every time the page is visited.
HTML5 has a file API that gives me the ability to display users local file data on the fly. Wondering if there is something similar for display remote data or would normal ajax be used?
Is there a standard way of doing this? Also are there any tutorials out there on how to do this in rails? Would like to go about doing this in the most safest and securest way.
I love tutorials and screencasts so I'd really be thankful for info on where I can find one to achieve what I'm trying to achieve.
Try to use open graph protocol to fetch site information before user sending the form.
I suggest the following gem:
https://github.com/intridea/opengraph
Open graph protocol:
http://ogp.me/
And I guess you should store all the fetched information in database.
The Video Thumb gem is probably what you are looking for.
It handles vimeo, youtube and potentially others.
Then you just do:
<%= VideoPlayer::player(library_item.url, 700, 420).html_safe %>
In your view to display an automatically generated embed code.
I googled a lot about how to make twitter media preview for my website entities if they are linked in a tweet like images below:
Any idea where can I find some documentation about it? Or a tutorial? Is this possible or these media/site previews are hardcoded in twitter?
EDIT:
so, what I need:
If someone links my site on twitter, my widget appear under the tweet, like below:
UPDATE 2012-06-13
It appears this is an Expanded Tweet - -what the requirements are to integrate these expansions into Twitter are do not appear to be displayed - but this sure is interesting.
Nope your in luck. They're not hardcoded into Twitter, they're available in the JSON response. You actually have in your post the word you need to google for entities.
You can add include_entities=1 to the end of most REST api calls and it will give you expanded information about the URL's contained within the JSON. It will split out all the URL's where you can parse out the Youtube links for example. The JSON also includes a special media_url entity but it only works for pictures. In any case, you can still parse out the media easily like youtube with a regex match because you get the URL's split out nicely with this include_entities=1 parameter.
example call :
http://api.twitter.com/1/statuses/user_timeline.json?screen_name=twitterapi&include_entities=1
more documentation : https://dev.twitter.com/docs/tweet-entities
answer edited below based on clarification:
Editing Twitter itself with previews is impossible and it's also ineffective. 75% of traffic to Twitter happens outside of Twitter.com. However the most probable solution to achieving this request would be to download a browser extension.
This extension for example enbales previews of webpages directly in the users stream content preview pane on Twitter.com
https://chrome.google.com/webstore/detail/oijgblonhcagdhfbgjilnpjipmijimmn
I'm pulling hair out, i might pull a tooth out next, thats how frustrated i am.
I have deleted (for the purpose of proving a point) ALL my RSS files in my wordpress site
http://baked-beans.tv
No matter what i edit, Google Reader reads what it wants, ie: the posts, and all it's content!
So how on earth am I supposed to edit the content which most of my RSS subscribers will view (since Google Reader is very popular)
If you look here: http://baked-beans.tv/feed/
There is NO content!
And yet if I add this URL to Google reader, it generates full posts in the feed.
Furthermore!
If I edit say... wp-includes/feed-rss2.php I can see those changes within the RSS parser of Safari, Firefox, etc, but again, Google just shows the same thing, the entire post.
This really isnt on. If you go to Google Reader, and click on "Show Details" it says "Feed URL: http://baked-beans.tv/feed/" Which is just a total lie.
I really need to control how people see posts. The posts contain hefty video and a lot of images, and it parses the post in a really unattractive way.
Thanks in advance,
Marc
I'm pretty sure Google is using a cached result because your feed is completely empty (which is invalid RSS, which is probably interpreted as an error condition, like the feed being down).
Try showing a feed that is valid, but empty. That should get Google to pick up the change sooner or later.
If you'd like to edit the contents of posts that were already crawled by Reader, you'll need to republish them with the same GUID (if using RSS) or ID (if using Atom). Reader keeps copies of posts indefinitely (so that it can show historical data for feeds), and it keys things off of the ID. If it sees a post with the same ID as one it already has, it'll update the content of its copy with the new crawled content (more details here).