Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

If I have the embed html for a google calendar, can I extract the url I would use to subscribe to the calendar?

For example:

Embed code (linebreaks added for clarity):

<html>
<iframe src="https://www.google.com/calendar/hosted/example.com/embed?
             height=600&amp;wkst=1&amp;bgcolor=%23FFFFFF&amp;
             src=example.com_ecafa7el7kc4du1ervkdff4x6a%40
             group.calendar.google.com&amp;color=%23AB8B00&amp;
             ctz=Pacific%2FApia"
        style=" border-width:0 " width="800" 
        height="600" frameborder="0" scrolling="no">
</iframe>
</html>

the juicy bit is src=example.com_ecafa7el7kc4du1ervkdff4x6a%40group.calendar.google.com but I can't seem to get it into a format I can use in Add -> Add by URL in my google calendar.

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

Given the following URL:

www.google.com/calendar/hosted/example.com/embed?height=600&wkst=1&bgcolor=%23FFFFFF&src=example.com_ecafa7el7kc4du1ervkdff4x6a%40group.calendar.google.com&color=%23AB8B00&ctz=Pacific%2FApia

You want to place the bold part in one of these templates:

XML: http://www.google.com/calendar/feeds/HERE/public/basic
ICAL: http://www.google.com/calendar/ical/HERE/public/basic.ics
HTML: http://www.google.com/calendar/hosted/HERE/embed?src=HERE

instead of the word HERE.

For example, if you wanted to use XML, use:

http://www.google.com/calendar/feeds/example.com_ecafa7el7kc4du1ervkdff4x6a%40group.calendar.google.com/public/basic

This requires the calendar to be public, which I assume it is, since there is an embeded version of it available.

share|improve this answer
    
perfect! thanks. can you edit your answer to make it a little clearer that the "juicy bit" minus the src= from my example is the address to use "HERE"? –  adambox Aug 4 '10 at 20:27
    
@adambox: I updated it –  Senseful Aug 4 '10 at 20:32
    
Confirming that this still works in 2014 and thanking you for an answer that's been useful to me more than once. :) –  Sean M Mar 22 at 0:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.