def process(self): self.media = [] yt = TopYoutube() yt_media = yt.discover() print str(len(yt_media)) + " top youtube items" if yt_media is not None: self.drop_top('youtube') self.media.append(('youtube', yt_media)) vi = TopVimeo() vi_media = vi.discover() print str(len(vi_media)) + " top vimeo items" if vi_media is not None: self.drop_top('vimeo') self.media.append(('vimeo', vi_media)) sc = TopSoundcloud() sc_media = sc.discover() print str(len(sc_media)) + " top soundcloud items" if sc_media is not None: self.drop_top('soundcloud') self.media.append(('soundcloud', sc_media)) sp = TopSpotify() sp_media = sp.discover() print str(len(sp_media)) + " top spotify items" if sp_media is not None: self.drop_top('spotify') self.media.append(('spotify', sp_media)) # Updates daily so drop old featured media, still exists in main media table self.client.insert_unassigned_media(self.media)
def process(self): self.media = [] yt = TopYoutube() yt_media = yt.discover() self.media.append(('youtube', yt_media)) vi = TopVimeo() vi_media = vi.discover() self.media.append(('vimeo', vi_media)) sc = TopSoundcloud() sc_media = sc.discover() self.media.append(('soundcloud', sc_media)) self.client.insert_unassigned_media(self.media)