MassMedia 1.3b3 documentation
In version 0.8 preliminary support for external services was added. The first service supported was creating a Collection
of a youtube.com playlist.
Creating a collection from a YouTube playlist will not import the videos on the playlist. Because you can change the playlist independently of the Django admin interface, it would be difficult to keep it in sync with YouTube. It is easy to use the Google YouTube API to get all the videos dynamically. See YouTube Collections and Templates.
The YouTube API requires 3 settings, EMAIL
, USERNAME
, PASSWORD
:
MASSMEDIA_SERVICES = {
'YOUTUBE': {
'EMAIL': '',
'USERNAME': '',
'PASSWORD': '',
},
}
YouTube has several different URLs that reference the playlist, depending on how you get to the playlist page.
If you go to any user’s page and click on the “Playlists” button
you can select a playlist from the list on the right.
The address bar address will change to look similar to:
http://www.youtube.com/washingtontimes#p/c/4A35EB2544D73557
If you go to My Videos & Playlists
and select Playlists from the list on the left.
You can use the Link: field URL; which is formatted like:
http://www.youtube.com/view_play_list?p=4A35EB2544D73557
If you look at the URL in the Embed: field, it contains a URL like:
http://www.youtube.com/p/4A35EB2544D73557?hl=en_US&fs=1
This URL requires you to chop off the question mark and everything after it:
http://www.youtube.com/p/4A35EB2544D73557
Collection
object in the admin.For information on displaying the collection, see YouTube Collections and Templates.