Example #1
0
 def parse_keyuser(self, response):
     item = WeibospiderItem() 
     analyzer = Analyzer()
     total_pq = analyzer.get_html(response.body, 'script:contains("feed_content wbcon")')
     item['keyword_uid'], item['keyword_alias'], item['keyword_time'], item['keyword_timestamp'] = analyzer.get_keyuser(total_pq)
     item['keyword'] = response.meta['keyword']
     return item
Example #2
0
 def atuser_uid_parser(self, response):
     item = WeibospiderItem()
     analyzer = Analyzer()
     friendcircle = FriendCircle()
     total_pq = analyzer.get_html(response.body,'script:contains("W_face_radius")') 
     uid = friendcircle.get_user_uid(total_pq)
     self.atuser_dict[response.meta['atuser_nickname']] = uid
     item['atuser_uid'] = uid
     item['uid'] = response.meta['uid']
     item['atuser_nickname'] = response.meta['atuser_nickname']
     yield item