Ejemplo n.º 1
0
 def get_or_create(self):
     user_list = self.filter_by(username=self._dict_data['username'])
     if not user_list:
         term = self._dict_data['username']
         scraper = FacebookScraper()
         scraper.search_profile_by_term(term)
         scraper = TwitterScraper()
         scraper.search_profile_by_term(term)
     user_list = self.filter_by(username=self._dict_data['username'])
     return user_list
Ejemplo n.º 2
0
 def get_or_create(self):
     user_list = self.filter_by(username=self._dict_data['username'])
     if not user_list:
         term = self._dict_data['username']
         scraper = FacebookScraper()
         scraper.search_profile_by_term(term)
         scraper = TwitterScraper()
         scraper.search_profile_by_term(term)
     user_list = self.filter_by(username=self._dict_data['username'])
     return user_list
Ejemplo n.º 3
0
 def test_search_profiles_by_term(self):
     self.assertEquals(0, User.objects.filter_by().count())
     term = 'Jhon Smith'
     scraper = FacebookScraper()
     scraper.search_profile_by_term(term)
     self.assertNotEquals(0, User.objects.filter_by().count())
Ejemplo n.º 4
0
 def create_users(self):
     term = 'Jhon Smith'
     scraper = FacebookScraper()
     scraper.search_profile_by_term(term)
     scraper = TwitterScraper()
     scraper.search_profile_by_term(term)
Ejemplo n.º 5
0
 def create_users(self):
     term = 'Jhon Smith'
     scraper = FacebookScraper()
     scraper.search_profile_by_term(term)
     scraper = TwitterScraper()
     scraper.search_profile_by_term(term)