- rss = self._download_xml('http://www.teachertube.com/rssclassroom.php?mode=user&username=%s' % user_id,
- user_id, 'Downloading classroom RSS')
-
- entries = []
- for url in rss.findall('.//{http://search.yahoo.com/mrss/}player'):
- entries.append(self.url_result(url.attrib['url'], 'TeacherTube'))
-
+ urls = []
+ webpage = self._download_webpage(url, user_id)
+ urls.extend(re.findall(self._MEDIA_RE, webpage))
+
+ pages = re.findall(r'/ajax-user/user-videos/%s\?page=([0-9]+)' % user_id, webpage)[:-1]
+ for p in pages:
+ more = 'http://www.teachertube.com/ajax-user/user-videos/%s?page=%s' % (user_id, p)
+ webpage = self._download_webpage(more, user_id, 'Downloading page %s/%s' % (p, len(pages)))
+ video_urls = re.findall(self._MEDIA_RE, webpage)
+ urls.extend(video_urls)
+
+ entries = [self.url_result(vurl, 'TeacherTube') for vurl in urls]