do I put the <itunes:new-feed-url> tag in the old feed or the new one when switching to a new podcast service? - itunes

I keep finding conflicting posts of people having the same issue. One person says they put the in the old feed, whereas others are saying they put it in the new feed. Any ideas?
What exactly does this tag do? I've read some posts that say it lets iTunes update the feed in iTunes?
Any info would be great. Thanks.

A podcast client which reads a feed with the <itunes:new-feed-url> tag will update its subscription for that podcast so it uses the URL from the tag.
From the spec:
Use the <itunes:new-feed-url> tag to manually change the URL where
your podcast is located. This tag is only supported at a
<channel>level (podcast).
So at the old feed location you want either:
A feed with the <itunes:new-feed-url> tag pointing to the new feed location. (Tag is in the old feed.)
OR
A HTTP 301 redirect to the new feed, which contains the <itunes:new-feed-url> tag pointing to the new feed location. (Tag is in the new feed.)
The latter is Apple's prescribed method:
Set your web server to return an HTTP 301 redirect response when it
receives a request for the old feed.
Use the <itunes:new-feed-url> tag in your new feed to point to the new URL.

Related

Liferay jsonws api: what is the staging url?

When a site has live content, it is possible to get the articles you posted using /api/jsonws/invoke URL and passing on a body with:
cmd:{"articles = /journal.journalarticle/get-articles": {"groupId": <gId>, "folderId": 0}}
p_auth: <p_auth>
But when the content is on staging mode, the same API returns a empty list.
Yet there's a proper Web Content manager for the staging content... That means that there should be an API for that.
Does anyone know the URL for the staging content API, or how can I get this data using a different cmd?
(if possible, with no use of additional servlets/java development)

Stubhub http request

I am trying to figure out how to use the HTTP request URL's provided by the stubhub Listing Catalog Service request page here: http://stubhubapi.stubhub.com/index.php/Anatomy_of_a_Listing_Catalog_Service_HTTP_Request
I looked at the example at the sample HTTP request, why does this: http://www.stubhub.com/listingCatalog/select/?q=%2B+stubhubDocumentType%3Agenre%0D%0A%2B+leaf%3Atrue%0D%0A&version=2.2&start=0&rows=10&indent=on return what it returns?
How to I modify this link to return only, say, Yankees game at Fenwick park?
According to the Stubhub API Reference, the sample url:
http://www.stubhub.com/listingCatalog/select/?q=%2B+stubhubDocumentType%3Agenre%0D%0A%2B+leaf%3Atrue%0D%0A&version=2.2&start=0&rows=10&indent=on
is the following SOLR search query, converted to a URL query string:
+stubhubDocumentType:genre
+leaf:true
This actually looks more like
+stubhubDocumentType:genre\n+leaf:true
and finally encoded to URL query
%2B+stubhubDocumentType%3Agenre%0D%0A%2B+leaf%3Atrue%0D%0A
http://www.stubhub.com/listingCatalog/select/ is the endpoint
the parameters on the end specify options
For Yankees at Fenwick park, you would probably want to search for Stubhub Events that are located in Fenwick park and have New York Yankees in the description.
You should take a look at this PHP example, which contains how to search the search for a specific search query.
For easy access to the Stubhub Api, check out a Ruby Gem that is a good wrapper for the API.

Google CardDAV changes vCard UID

I'm integrating the Google CardDAV with my webApplication. I have a strange problem sometimes when I make a PUT of a new vCard.
If the vCard contains a UID and the UID is a GUID Google changes the vCard UID with a 16-char UID.
for example: This is my original vCard
BEGIN:VCARD
VERSION:3.0
N:Pinch;David;;;
FN:David Pinch
REV:2013-01-09T09:26:34Z
UID:6c34bedcf256408780d8ffe269ec2b3b
END:VCARD
So I PUT this into Google CardDAV, into the current url:
https://www.google.com/m8/carddav/principals/__uids__/myusername#gmail.com/lists/default/6c34bedcf256408780d8ffe269ec2b3b
The result is ok, and the contact is really created on Google Contacts.
BUT:
if "now" I retrieve the current vCard from the same URL i have the following response.
BEGIN:VCARD
VERSION:3.0
N:Pinch;David;;;
FN:David Pinch
REV:2013-01-09T09:44:25Z
UID:716212e795884e43
END:VCARD
You can see that UID has changed and passed from original
UID:6c34bedcf256408780d8ffe269ec2b3b
To
UID:716212e795884e43
Curiously if I retrieve the card with the following Request
https://www.google.com/m8/carddav/principals/__uids__/myusername#gmail.com/lists/default/716212e795884e43
I have Exactly the same Response, like the vCard references two different Path url.
However when i retrieve the list of the contact from CardDAV, this return the second URL.
If I does not create the vCard with a GUID but with a 16-char UID, Seems that Google accept this, but sometimes it changes However, so I cannot be sure of the uniqueness of the Card.
A workaround seem to be of re-download the vCard after every PUT, but this causes a payload important that I wanted to avoid.
I use the same procecures with iCloud CardDAV and this doesn't happen.
Anyone can help me?
When you PUT a vCard to Google CardDAV it will recreate a new vCard V3.0 and dispose the original data posted including data loss and the UID / URI path changes you describe.
Other then UID change Google CardDAV has other issues
Data loss
Rejection of valid vCards
Slowness (10-20s per write
operation)
More details in the following Google CardDAV stress test article:
https://evertpot.com/google-carddav-issues/
My advise after still seeing these failures in 2018: its better to use Google's Contacts API instead of there CardDAV implementation.

How do the Facebook like button and Google +1 button deal with a redirected url? [duplicate]

I understand the og:url meta tag is the canonical url for the resource in the open graph.
What strategies can I use if I wish to support 301 redirecting of the resource, while preserving its place in the open graph? I don't want to lose my likes because i've changed the URLs.
Is the best way to do this to store the original url of the content, and refer to that? Are there any other strategies for dealing with this?
To clarify - I have page:
/page1, with an og:url of http://www.example.com/page1
I now want to move it to
/page2, using a 301 redirect to http://www.example.com/page2
Do I have any options to avoid losing the likes and comments other than setting the og:url meta to /page1?
Short answer, you can't.
Once the object has been created on Facebook's side its URL in Facebook's graph is fixed - the Likes and Comments are associated with that URL and object; you need that URL to be accessible by Facebook's crawler in order to maintain that object in the future. (note that the object becoming inaccessible doesn't necessarily remove it from Facebook, but effectively you'd be starting over)
What I usually recommend here is (with examples http://www.example.com/oldurl and http://www.example.com/newurl):
On /newpage, keep the og:url tag pointing to /oldurl
Add a HTTP 301 redirect from /oldurl to /newurl
Exempt the Facebook crawler from this redirect
Continue to serve the meta tags for the page on http://www.example.com/oldurl if the request comes from the Facebook crawler.
No need to return any actual content to the crawler, just a simple HTML page with the appropriate tags
Thus:
Existing instances of the object on Facebook will, when clicked, bring users to the correct (new) page via your redirect
The Like button on the (new) page will still produce a like of the correct object (but at the old URL)
If you're moving a lot of URLs around or completely rewriting your URL scheme you should use the new URLs for new articles/products/etc, but you'll need to keep the redirect in place if you want to retain likes, comments, etc on the older content.
This includes if you're changing domain.
The only problem here is maintaining the old URL -> new URL mapping somewhere in your code, but it's not technically difficult, just an additional thing to maintain in the future.
BTW, The Facebook crawler UA is currently facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)
I'm having the same problem with my old sites. Domains are changing, admins want to change urls for seo etc
I came to conclusion its best to have some sort uniqe id in db just for facebook - from the beginning. For articles for example I have myurl.com/a/123 where 123 is ID of the article.
Real url is myurl.com/category/article-title. Article can then be put in different category, renamed etc with extensive logic for 301 redirects behind it. But the basic fb identifier can stay the same for ever.
Of course this is viable only when starting with a fresh site or when implementing fb comments for the first time.
Just an idea if you can plan ahead :) Let me know what you think.

Finding the URL for podcast feeds from an iTunes id. (iTMS API)

I'm look at a way of turning an iTunes podcast id into the RSS feed that the podcast producer serves.
I'm aware of the RSS generator, which can be used to generate a feed of links to podcasts, but these links are to HTML pages.
If you have iTunes open, you can manually export the list of podcasts by exporting to OPML, so we can surmise that iTunes eventually knows how to decode them (i.e. they're not exclusively going through an iTMS host).
I have looked at the Affiliate API document which gives you some nice JSON back. This gives you a collectionViewUrl which is the same as the ones given in the RSS generator, and incidentally, the iTunes Link Generator. It also give you the id, and a whole load of other things including a preview audio file which is not hosted on the phobos.
At this point, I'm looking for anything that would help me solve this question, including any language, unofficial or not.
(in actual fact, I'd prefer something vaguely supported, and in Java, that didn't involve HTML scraping).
Through a combination of answers from these two questions, I have found a way to do what I want.
Example of finding podcasts
First: grab a list of podcasts from iTunes, using the RSS generator. I'm not sure how the query parameters work yet, but here is an RSS feed for top tech podcasts in the US.
http://ax.itunes.apple.com/WebObjects/MZStoreServices.woa/ws/RSS/toppodcasts/sf=143441/limit=25/genre=1318/xml
sf relates to country, and is optional. I would guess that this defaults to global if absent.
genre relates to genre, and is optional. I would guess that this defaults to "all genres" is absent.
limit is optional, and seems to default to 9.
This gives you an Atom feed of podcasts. You'll need to do some sperlunking with XPath to get to the ITMS id of podcast, but you're looking for the numeric id contained in the URL found at the following XPath:
/atom:feed/atom:entry/atom:link[#rel='alernate']/#href
For example, the excellent JavaPosse has an id of 81157308.
The Answer to the Question
Once you have that id, you can get another document which will tell you the last episode, and the original feed URL. The catch here is that you need to use an iTunes user-agent to get this document.
e.g.
wget --user-agent iTunes/7.4.1 \
--no-check-certificate \
"https://buy.itunes.apple.com/WebObjects/MZFinance.woa/wa/com.apple.jingle.app.finance.DirectAction/subscribePodcast?id=81157308&wasWarnedAboutPodcasts=true"
This is a plist containing some metadata about the podcast, including the feed URL.
<key>feedURL</key><string>http://feeds.feedburner.com/javaposse</string>
The XPath for this could be something like:
//key[#text='feedURL']/following-sibling::string/text()
Disclaimer
Not entirely sure how stable any of this is, or how legal it is. YMMV.
As soon as you have the id you can use it in lookup as defined in
https://performance-partners.apple.com/search-api
You should get what you need by parsing the response with JSON
To elaborate on #juhariis' answer, here's the basics of extracting the feed url from the json (python3):
from urllib.request import urlopen
from urllib.parse import urlparse
import codecs
import json
podcast_url = 'https://itunes.apple.com/us/podcast/grow-big-always/id1060318873'
ITUNES_URL = 'https://itunes.apple.com/lookup?id='
parsed = urlparse(podcast_url)
id = parsed.path.split('/')[-1][2:]
reader = codecs.getreader('utf-8')
with urlopen(ITUNES_URL + id) as response:
feed = json.load(reader(response))['results'][0]['feedUrl']
print(feed)
Here's a script/module I made, that makes use of this: https://gist.github.com/theychx/f9fad123bef27bebac665847c7884cd9
I searched for a long time to deconstruct the iTunes podcast feed. It's a plist containing meta data, of which one of them is an RSS feed. My blog post How to subscribe to iTunes podcasts on Android has links to code in php and in javascript to extract the URL to the RSS feed from an individual iTunes link.