• Najnowsze pytania
  • Bez odpowiedzi
  • Zadaj pytanie
  • Kategorie
  • Tagi
  • Zdobyte punkty
  • Ekipa ninja
  • IRC
  • FAQ
  • Regulamin
  • Książki warte uwagi

Python Instagram bot

Object Storage Arubacloud
0 głosów
984 wizyt
pytanie zadane 9 czerwca 2019 w Python przez toni_181 Nowicjusz (120 p.)
NOTES:
- I am an one month old InstaPy user, with a small following. So my numbers
in settings are bit conservative.
"""

from instapy import InstaPy
from instapy import smart_run

# get a session!
session = InstaPy(username='', password='')

# let's go! :>
with smart_run(session):
    """ Start of parameter setting """
    # don't like if a post already has more than 150 likes
    session.set_delimit_liking(enabled=True, max=150, min=0)

    # don't comment if a post already has more than 4 comments
    session.set_delimit_commenting(enabled=True, max=4, min=0)

    """I used to have potency_ratio=-0.85 and max_followers=1200 for 
    set_relationship_bounds()
        Having a stricter relationship bound to target only low profiles 
        users was not very useful,
        as interactions/sever calls ratio was very low. I would reach the 
        server call threshold for
        the day before even crossing half of the presumed safe limits for 
        likes, follow and comments (yes,
        looks like quiet a lot of big(bot) managed accounts out there!!).
        So I relaxed it a bit to -0.50 and 2000 respectively.
    """
    session.set_relationship_bounds(enabled=True,
                                    potency_ratio=-0.50,
                                    delimit_by_numbers=True,
                                    max_followers=2000,
                                    max_following=3500,
                                    min_followers=25,
                                    min_following=25)
    session.set_do_comment(True, percentage=20)
    session.set_do_follow(enabled=True, percentage=20, times=2)
    session.set_comments(['Amazing!', 'Awesome!!', 'Cool!', 'Good one!',
                          'Really good one', 'Love this!', 'Like it!',
                          'Beautiful!', 'Great!', 'Nice one'])
    session.set_sleep_reduce(200)

    """ Get the list of non-followers
        I duplicated unfollow_users() to see a list of non-followers which I 
        run once in a while when I time
        to review the list
    """
    # session.just_get_nonfollowers()

    # my account is small at the moment, so I keep smaller upper threshold
    session.set_quota_supervisor(enabled=True,
                                 sleep_after=["likes", "comments_d", "follows",
                                              "unfollows", "server_calls_h"],
                                 sleepyhead=True, stochastic_flow=True,
                                 notify_me=True,
                                 peak_likes=(100, 700),
                                 peak_comments=(25, 200),
                                 peak_follows=(48, 125),
                                 peak_unfollows=(35, 400),
                                 peak_server_calls=(None, 3000))
    """ End of parameter setting """

    """ Actions start here """
    # Unfollow users
    """ Users who were followed by InstaPy, but not have followed back will 
    be removed in
        One week (168 * 60 * 60)
        Yes, I give a liberal one week time to follow [back] :)
    """
    session.unfollow_users(amount=25, InstapyFollowed=(True, "nonfollowers"),
                           style="RANDOM",
                           unfollow_after=168 * 60 * 60,
                           sleep_delay=600)

    # Remove specific users immediately
    """ I use InstaPy only for my personal account, I sometimes use custom 
    list to remove users who fill up my feed
        with annoying photos
    """
    # custom_list = ["sexy.girls.pagee", "browneyedbitch97"]
    #
    # session.unfollow_users(amount=20, customList=(True, custom_list,
    # "all"), style="RANDOM",
    #                        unfollow_after=1 * 60 * 60, sleep_delay=200)

    # Like by tags
    """ I mostly use like by tags. I used to use a small list of targeted 
    tags with a big 'amount' like 300
        But that resulted in lots of "insufficient links" messages. So I 
        started using a huge list of tags with
        'amount' set to something small like 50. Probably this is not the 
        best way to deal with "insufficient links"
        message. But I feel it is a quick work around.
    """

    session.like_by_tags(['tag1', 'tag2', 'tag3', 'tag4'], amount=300)

    """ Joining Engagement Pods...
    """
    session.join_pods()

Witam. Przychodzę z problemem bota który ma symulować moje ruchy na Instagram. Jestem nowy w programowaniu i mam problem z tym aby bot znaleziony w internecie zaczął działać, pojawiaj mi sie takie błędy podczas próby odpaleni go.

Pobierałem juz wcześniej pakiet pip, odinstalowywałem program i nadal nie wiem gdzie jest problem posiłkuje się tym mi materiałami:

https://www.youtube.com/watch?v=bwB5mR5PpTg&t=336s

https://www.youtube.com/watch?v=BGU2X5lrz9M

https://www.youtube.com/watch?v=L6VDttSAt2k&t=1s

Ale na moim początkowym poziome nic mi ta wiedza nie daje bardzo proszę o pomoc osoby która była by chętna mi pomoc aby to wszytko ustawić.

komentarz 18 czerwca 2019 przez Hunter94 Mądrala (6,290 p.)
daj log w cywilizowanym formacie(tekst w bloku code) a nie print screen bo nic nie widać.
Z wielkim trudem doczytuje się że pewnie jest tam None Type is not iterable.
Oznacza to tyle że albo czegoś nie podałeś, albo nie jest w stanie sobie jakiś danych pobrać.

1 odpowiedź

0 głosów
odpowiedź 16 czerwca 2021 przez graj23x Obywatel (1,590 p.)
Ja  chcę zrobić automatycznie dodawanie followers po hasztagach i zrobiłem kod gdzie automatycznie się loguję i dalej nie wiem jak zrobić kod do hasztagów typu dennis,footbaal + automatycznie following .I ten kod co tu go podajesz to jakaś lipa on jest na yt i też z nim się bawiłem.

Podobne pytania

0 głosów
0 odpowiedzi 313 wizyt
pytanie zadane 12 października 2018 w Bezpieczeństwo, hacking przez Kuba11 Nowicjusz (120 p.)
0 głosów
1 odpowiedź 400 wizyt
pytanie zadane 14 listopada 2020 w Python przez Kamień Nowicjusz (120 p.)

92,555 zapytań

141,402 odpowiedzi

319,541 komentarzy

61,939 pasjonatów

Motyw:

Akcja Pajacyk

Pajacyk od wielu lat dożywia dzieci. Pomóż klikając w zielony brzuszek na stronie. Dziękujemy! ♡

Oto polecana książka warta uwagi.
Pełną listę książek znajdziesz tutaj.

Akademia Sekuraka

Kolejna edycja największej imprezy hakerskiej w Polsce, czyli Mega Sekurak Hacking Party odbędzie się już 20 maja 2024r. Z tej okazji mamy dla Was kod: pasjamshp - jeżeli wpiszecie go w koszyku, to wówczas otrzymacie 40% zniżki na bilet w wersji standard!

Więcej informacji na temat imprezy znajdziecie tutaj. Dziękujemy ekipie Sekuraka za taką fajną zniżkę dla wszystkich Pasjonatów!

Akademia Sekuraka

Niedawno wystartował dodruk tej świetnej, rozchwytywanej książki (około 940 stron). Mamy dla Was kod: pasja (wpiszcie go w koszyku), dzięki któremu otrzymujemy 10% zniżki - dziękujemy zaprzyjaźnionej ekipie Sekuraka za taki bonus dla Pasjonatów! Książka to pierwszy tom z serii o ITsec, który łagodnie wprowadzi w świat bezpieczeństwa IT każdą osobę - warto, polecamy!

...