Esempio n. 1
0
 def fetchScoring(self):
     """
     Récupérer informations liés au scoring d'un utilisateur
     """
     if not self.nb_pin:
         self.fetchUser()
     pins_info=PinListPage('{0}/pins/?page='.format(self.url()), self.id)
     nb_pages=self.nb_pin/50 + (self.nb_pin%50 !=0)
     pins_info.fetch(nb_pages)
     pins_info.calcScoringInfo(self.nb_pin)
     self.nb_liked=pins_info.nb_liked
     self.nb_comment=pins_info.nb_comment
     self.nb_repin=pins_info.nb_repin
Esempio n. 2
0
 def task(url,user_id):
     pin_page=PinListPage('{0}/pins/?page='.format(url), user_id)
     pin_page.fetch(1)
     lock.acquire()
     pin_list.extend(pin_page.pin_list)
     lock.release()