Ejemplo 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()
Ejemplo n.º 2
0
Archivo: spider.py Proyecto: 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()
Ejemplo 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()
Ejemplo n.º 4
0
Archivo: spider.py Proyecto: 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()