def launchSearch(self, name, email):
        result = searchFullContact(email)

        photoUrls = [photo.get('url', '') for photo in getList(result, 'photos')]
        thumbnails, _, profile = searchPipl(email)

        if 'mainPicture' in profile:
            photoUrls.append(profile.get('mainPicture'))

        # self.webPicturesIterator = WebPicturesIterator(photoUrls)
        self.webPicturesIterator = WebPicturesIterator([])
        # self.socialNetworkIterator = SocialNetworkIterator(getList(result, 'socialProfiles'))
        self.socialNetworkIterator = SocialNetworkIterator([])
        self.rotateWebData()

        twitterThumbs = [t for t in thumbnails if t[2] is not None and 'twitter.com' in t[2]]
        others = [t for t in thumbnails if t[2] is not None and 'twitter.com' not in t[2]]

        self.thumbnailsCarrousel.start(twitterThumbs[:2] + others)
Exemplo n.º 2
0
def doPiplSearch(email):
    os.system('pkill firefox')
    time.sleep(2)
    _, subjectLinks, profile = searchPipl(email)

    speaker = LinuxEspeak(SPANISH_VOICE)
    safeSay(speaker, profile, 'career', 'Experiencia laboral')
    safeSay(speaker, profile, 'education', 'Estudios')
    safeSay(speaker, profile, 'location', 'País')
    safeSay(speaker, profile, 'usernames', 'Nombres de usuario')
    safeSay(speaker, profile, 'associated with', 'En contacto con')

    print subjectLinks
    limit = len(subjectLinks) if len(subjectLinks) < 8 else 8

    for i in xrange(2):
        logging.debug('Round {0} for open websites.'.format(i))
        for j in xrange(limit):
            logging.debug('Opening {0} website.'.format(j))
            webbrowser.open(subjectLinks[j])
            time.sleep(WEB_BROWSER_OPEN_DELAY)

        os.system('pkill firefox')
        time.sleep(WEB_BROWSER_OPEN_DELAY)