예제 #1
0
def main():
    av_request, regions, ads_obj, url_generator, session = config_main()
    urls = url_generator.urls(regions, av_request)
    with ThreadPoolExecutor(max_workers=2) as executor:
        for i in range(1, 30):
            url_page = urls + str(i)
            threads_ads = executor.submit(get_urls_from_page, url_page, ads_obj, session, i)


    with ThreadPoolExecutor(max_workers=1) as executor:
        future = executor.submit(get_info_from_page, ads_obj, regions)
        sleep(2)

    for ad in ads_obj.info_ads:
        ad_db = InformationFromAds(**ad)
        session.add(ad_db)
    session.commit()
예제 #2
0
def main(config):
    config_main(config)
    config_tap(config)
    config_ti(config)
예제 #3
0
def main(config):
    config_main(config)
    build_openvpn()
    make_dist(config, tap=False)
예제 #4
0
def main(config):
    config_main(config)
    build_openvpn()
    make_dist(config, tap=False)