django-youtube
django-youtube copied to clipboard
fetch_feed_by_username giving error: 'YouTubeVideoEntry' object has no attribute 'video_id'
Here's my effort:
def video_list(request, username=None):
# trying to lists all user uploaded videos in my channel
# If user is not authenticated and username is None, raise an error
if username is None and not request.user.is_authenticated():
from django.http import HttpResponse
return HttpResponse404
# loop through the videos of the user
api = Api()
api.authenticate()
videos = api.fetch_feed_by_username (username='mychannelname')
video_params = []
for video in videos.entry: # omitting entry gives error "...object not iterable"
video_params.append(_video_params(request, video.video_id))
return render_to_response(
"django_youtube/videos.html",
{"video_params": video_params},
context_instance=RequestContext(request)
)
what could I be doing wrong?
It seems that the problem is in fetch_feed_by_username
api method. I'll try to fix it whenever I can.
shot Lap. Thanks