1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Python - View bot?

Discussão em 'Python' iniciado por Stack, Maio 17, 2025.

  1. Stack

    Stack Membro Participativo

    I'm trying to write some code for viewbot.

    Code:

    import requests
    from bs4 import BeautifulSoup
    import html5lib
    import urllib
    import argparse, os, time
    import urllib.parse, random

    headers = {
    'user-agent':'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Mobile Safari/537.36'
    }
    login_data = {
    'login': 'xxx',
    'pass': 'xxx',
    'back_url': ''
    }


    Login on site works correctly.

    Lists people:

    def getPeopleLinks(page):
    links = []
    for link in soups.find_all('a'):
    url = link.get('href')
    if url:
    if 'profile/' in url:
    links.append(url)
    return links


    Working...

    And other code:

    with requests.Session() as session:
    url = "https://xxxxxx.com/Login/?form_login=1"

    post = session.post(url, data=login_data, headers=headers)
    print (post.status_code)
    print (post.cookies)
    r = session.get("https://xxxxxxx.com/online/GIRL")
    print (r.status_code)
    print (r.cookies)
    soups = BeautifulSoup(r.content, 'html5lib')
    x = getPeopleLinks(soups)
    print(x)
    print("http://www.xxxxx.com"+ x[2])
    for link in x:
    urllib.request.urlopen("http://www.xxxxxxx.com"+link)
    print(link)


    Login: Works correctly.
    List of online users: Works correctly; I get all list of profiles.

    I think it's a problem here:

    for link in x:
    urllib.request.urlopen("http://www.xxxxxxx.com"+link)
    print(link)



    I was logged in on another account by mobile, my profile was on the list, but the bot on the PC did not view my profile.

    Continue reading...

Compartilhe esta Página