Skiper22 Napisano Sierpień 2, 2020 Zgłoś Napisano Sierpień 2, 2020 Nie umiem znaleść pewnych modulów przy tworzeniu bota do instagrama .Oto kod import AccountAgent, DBUsers import Constants import datetime def init(webdriver): Constants.init() AccountAgent.login(webdriver) def update(webdriver): #Get start of time to calculate elapsed time later start = datetime.datetime.now() #Before the loop, check if should unfollow anyone _check_follow_list(webdriver) while True: #Start following operation AccountAgent.follow_people(webdriver) #Get the time at the end end = datetime.datetime.now() #How much time has passed? elapsed = end - start #If greater than our constant to check on #followers, check on followers if elapsed.total_seconds() >= Constants.CHECK_FOLLOWERS_EVERY: #reset the start variable to now start = datetime.datetime.now() #check on followers _check_follow_list(webdriver) def _check_follow_list(webdriver): print("Checking for users to unfollow") #get the unfollow list users = DBUsers.check_unfollow_list() #if there's anyone in the list, start unfollowing operation if len(users) > 0: AccountAgent.unfollow_people(webdriver, users) Cytuj
Bartosz Wójcik Napisano Sierpień 2, 2020 Zgłoś Napisano Sierpień 2, 2020 Wygląda to na czyjąś gotową paczkę. Cytuj
EMUSING Napisano Grudzień 10, 2022 Zgłoś Napisano Grudzień 10, 2022 Wygląda na to, że te moduły nie są standardowymi modułami Pythona, ale są specjalnie napisane dla tego projektu. Przyjrzyj się kodowi i sprawdź, czy moduły AccountAgent, DBUsers oraz Constants zostały zaimportowane z odpowiednich plików w tym samym katalogu lub z poziomu tego samego katalogu nadrzędnego. Jeśli tak, a moduły nadal nie zostaną znalezione, upewnij się, że pliki z modułami zostały poprawnie nazwane i znajdują się w odpowiednim katalogu. Cytuj
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.