Exemplo n.º 1
0
 def save_album(self, html, user):
     lis = html('.chart_album').find('li')
     for li in lis.items():
         album = Entry()
         album.name = li('.name').find('a').eq(0).text()
         album.hits = li('.playcounts').text()
         album.state = 2
         album.user_id = self.uid
         album = self.save(album)
         print album._json()
Exemplo n.º 2
0
Arquivo: spider.py Projeto: nuty/xiaer
 def save_album(self, html,user):
     lis = html('.chart_album').find('li')
     for li in lis.items():
         album = Entry()
         album.name = li('.name').find('a').eq(0).text()
         album.hits = li('.playcounts').text()
         album.state = 2
         album.user_id = self.uid
         album = self.save(album)
         print album._json()
Exemplo n.º 3
0
 def save_artist(self, html, user):
     lis = html('.chart_artsit').find('li')
     for li in lis.items():
         artist = Entry()
         artist.name = li('.ico_radio').text()
         artist.hits = li('.playcounts').text()
         artist.state = 1
         print "***************"
         print user._json()
         print "***************"
         artist.user_id = self.uid
         artist = self.save(artist)
         print artist._json()
Exemplo n.º 4
0
Arquivo: spider.py Projeto: nuty/xiaer
 def save_artist(self, html, user):
     lis = html('.chart_artsit').find('li')
     for li in lis.items():
         artist = Entry()
         artist.name = li('.ico_radio').text()
         artist.hits = li('.playcounts').text()
         artist.state = 1
         print "***************"
         print user._json()
         print "***************"
         artist.user_id = self.uid
         artist = self.save(artist)
         print artist._json()