Пример #1
0
 def __init__(self, opts, args):
     FileGenerator.__init__(self, opts, args)
     CppHeaderObserver.__init__(self)
     self.__toDocs = []
     self.__target = None
     self.__leadingWSRe = re.compile(r"(?P<spaces>^\s*)")
     self.__whiteSpaceRe = re.compile(r"\s+")
Пример #2
0
def live_martin_m2_renderer(image):
    generator = FileGenerator()
    slowscan = MartinM2Generator(image, 48000, 16)

    MartinM2GeneratorWorker(slowscan, generator).start()

    rv = Response(generator.read_generator(), mimetype='audio/wav')
    rv.headers['Content-Length'] = 5661190
    return rv
Пример #3
0
def live_martin_m2_renderer(image):
    generator = FileGenerator()
    slowscan = MartinM2Generator(image, 48000, 16)

    MartinM2GeneratorWorker(slowscan, generator).start()

    rv = Response(generator.read_generator(), mimetype='audio/wav')
    rv.headers['Content-Length'] = 5661190
    return rv
Пример #4
0
def main():
    listOfCandidates = [0] * 13  #all candidates

    listOfCandidates[0] = "https://www.facebook.com/pg/ad.alvarodias/posts/"
    listOfCandidates[
        1] = "https://www.facebook.com/pg/depudadocabodaciolo/posts/"
    listOfCandidates[2] = "https://www.facebook.com/pg/cirogomesoficial/posts/"
    listOfCandidates[3] = "https://www.facebook.com/pg/geraldoalckmin/posts/"
    listOfCandidates[
        4] = "https://www.facebook.com/pg/guilhermeboulos.oficial/posts/"
    listOfCandidates[
        5] = "https://www.facebook.com/pg/hmeirellesoficial/posts/"
    listOfCandidates[
        6] = "https://www.facebook.com/pg/jairmessias.bolsonaro/posts/"
    listOfCandidates[7] = "https://www.facebook.com/pg/JoaoAmoedoNOVO/posts/"
    listOfCandidates[8] = "https://www.facebook.com/pg/goulartoficial/posts/"
    listOfCandidates[9] = "https://www.facebook.com/pg/eymaelOficial/posts/"
    listOfCandidates[10] = "https://www.facebook.com/pg/Lula/posts/"
    listOfCandidates[
        11] = "https://www.facebook.com/pg/marinasilva.oficial/posts/"
    listOfCandidates[12] = "https://www.facebook.com/pg/verapstu/posts/"

    #login facebook
    driver = webdriver.Chrome(executable_path=r'C:\apps\chromedriver.exe')

    usr = "******"
    pwd = ""
    # or you can use Chrome(executable_path="/usr/bin/chromedriver")
    driver.get("http://www.facebook.org")
    assert "Facebook" in driver.title
    elem = driver.find_element_by_id("email")
    elem.send_keys(usr)
    elem = driver.find_element_by_id("pass")
    elem.send_keys(pwd)
    elem.send_keys(Keys.RETURN)
    index = 0
    while index < len(listOfCandidates):
        driver.get(listOfCandidates[index])
        elem = driver.find_element_by_xpath("//*")
        source_code = elem.get_attribute("outerHTML")
        app = AppEleicoes(source_code)
        listOfPosts = app.ToString()
        file = FileGenerator(namesOfCandidates(index))
        i = 0
        while i < len(listOfPosts):
            file.write(listOfPosts[i])
            i += 1
        index += 1

    driver.quit()
    driver.close()
Пример #5
0
 def __init__(self, opts, args):
     FileGenerator.__init__(self, opts, args)