1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Python view/visit bot

Discussion in 'Scripting' started by rockstarrr, Jul 10, 2017.

  1. rockstarrr

    rockstarrr Regular Member

    Joined:
    Jul 25, 2012
    Messages:
    246
    Likes Received:
    21
    i am searching someone who can make a script wich is visiting a site for about 10 min and grab a proxy from a proxylist, and visit it again.
    my should work, but its not really working



    import random, time, requests
    from selenium import webdriver
    from selenium.webdriver.common.proxy import *
    from bs4 import BeautifulSoup
    USER_AGENTS_FILE = './user_agents.txt'
    RUNNING = True
    def LoadUserAgents(uafile=USER_AGENTS_FILE) :
    uas = []
    with open(uafile, 'rb') as uaf:
    for ua in uaf.readlines() :
    if ua:
    uas.append(ua.strip())
    random.shuffle(uas)
    return uas
    uas = LoadUserAgents()
    while RUNNING == True:
    address = []
    PROXY_HOST = ""
    PROXY_PORT = ""
    response = requests.get('https://www.sslproxies.org')
    soup = BeautifulSoup(response.content, "html.parser")
    rows = soup.findAll("tr")
    for row in rows:
    if(len(row.findAll("td")) == 8):
    PROXY_HOST = row.contents[0].contents[0]
    PROXY_PORT = row.contents[1].contents[0]
    profile = webdriver.FirefoxProfile()
    profile.set_preference('general.useragent.override', random.choice(uas))
    profile.set_preference("network.proxy.type", 1)
    profile.set_preference("network.proxy.http",PROXY_HOST)
    profile.set_preference("network.proxy.http_port",int(PROXY_PORT))
    profile.update_preferences()
    driver = webdriver.Firefox(firefox_profile=profile)
    driver.set_page_load_timeout(10)
    try:
    driver.get('http://www.ipchicken.com/')
    time.sleep(60)
    driver.quit()
    except:
    driver.quit()
     
    Last edited: Jul 10, 2017
  2. LostLife

    LostLife Regular Member

    Joined:
    May 12, 2017
    Messages:
    258
    Likes Received:
    283
    Gender:
    Male
    Occupation:
    Software Engineer
    Are you trying to build a traffic bot?
    In which step are you failing? Does it successfully scraps proxy or is it failing to scrap proxy host and port?
     
  3. rockstarrr

    rockstarrr Regular Member

    Joined:
    Jul 25, 2012
    Messages:
    246
    Likes Received:
    21
    a viewbot for mixer.com... so basically i just need a traficbot, right? i am not sure how to do it
     
  4. mazert

    mazert Newbie

    Joined:
    Aug 9, 2017
    Messages:
    4
    Likes Received:
    9
    Gender:
    Male
    Occupation:
    developping softwares and websites
    Location:
    France
    Home Page:
    Hello, we can discuss together to make this bot, I'm a python developer (this is my job). So you just need a bot that visit a stream from mixer.com for at least 10 mn through a proxy, again and again. Send me a pm and we will agree on a price :)
     
  5. botrockets

    botrockets Regular Member

    Joined:
    Mar 16, 2013
    Messages:
    282
    Likes Received:
    475
    Occupation:
    Software Developer
    Location:
    Saint T.N.
    I can do it in 10 min with F# and .NET 4.7... In fact I am writing a proxy scraper and tester