Exemplo n.º 1
0
 def start_requests(self):
     db.attach(self)
     for artist in self.session.query(db.Artist).all():
         if artist.douban:
             request = scrapy.Request(self.url_pattern_musician %
                                      artist.douban)
             request.meta['mid'] = artist.id
             yield request
Exemplo n.º 2
0
 def start_requests(self):
     db.attach(self)
     query = self.session.query(
         db.Music).filter(db.Music.channel == db.CHANNEL)
     for music in query.all():
         request = scrapy.Request(self.url_pattern % music.channel_song_id)
         request.meta['music'] = music
         yield request
Exemplo n.º 3
0
 def start_requests(self):
     db.attach(self)
     query = self.session.query(
         db.User).filter(db.User.channel == db.CHANNEL)
     for user in query.all():
         if user.nick is None:
             yield scrapy.Request(
                 'https://frodo.douban.com/api/v2/user/' + user.user_id +
                 '?os_rom=flyme4&apikey=0dad551ec0f84ed02907ff5c42e8ec70&channel=Meizu_Market&udid=05ac1c24d6c2fe71c303c65f32b41d915343b987&_sig=vRQoW7znmzvf6mMJpw3jmJUPgpc%3D&_ts=1512110532',
                 headers={
                     'User-Agent':
                     'api-client/1 com.douban.frodo/5.13.0(116) Android/23 product/meizu_M5s vendor/Meizu model/M5s  rom/flyme4  network/wifi',
                     'referer': None
                 })
Exemplo n.º 4
0
 def open_spider(self, spider):
     db.attach(self)
Exemplo n.º 5
0
 def start_requests(self):
     db.attach(self)
     for artist in self.session.query(db.Artist).all():
         request = scrapy.Request(self.url_pattern_search % artist.artist_name)
         request.meta['artist'] = artist
         yield request