Beispiel #1
0
            # count in progress_bar is i+1 because we start at zero and
            # this should not be zero-based counter
            if showProgressBar:
                progress_bar.print_progress(i + 1, totlen)

            if i == totlen:
                break

    # send email if search results come back
    if searchresults:

        # format message to send
        msg = ''
        for sr in searchresults:
            url = 'https://twitter.com/' +\
                  sr.reference.user.screen_name +\
                  '/status/' +\
                  sr.reference.id_str

            msg += url + ' at ' + str(sr.match_loc) + '\n\n'

        log.info(msg)
        gm.create_and_send_message('photomongo results to review',\
                                   msg)
    else:
        msg = 'Photomongo found no results in ' + str(totlen) + ' tweets.'
        log.info(msg)
        gm.create_and_send_message('photomongo no results',\
                                   msg)