使用一些基本功能的小型Instagram机器人程序包。下载并享受乐趣
instabotp的Python项目详细描述
Instagram_机器人
这个instabotpy是一个用于login的模块,比如,不像,follow,unfollow,logout,open post in your profile和instagram的explore section。在
确保您的系统有Chormedriver或单击here安装它
Note: This module uses selenium webdriver. Based on your chrome version select the chromedriver installation options and make sure that chromedriver is installed in path C:\Program Files\chromedriver.exe.
如果您的计算机上没有预装selenium webdriver,则或单击here或使用安装
pip install selenium
模块使用
要将此模块克隆到python脚本中,或
^{pr2}$为了确保instabotpy在pythonshell上安装后能正常工作
>>>importinstabotpy
现在你应该看到一个Chrome浏览器打开了instagram登录页面
Login into instagram
frominstabotpyimport*# Used to login without accepting to turn on notifications or save informations#User is recommended to login with this option alwayslogin_no_info(username,password)
#used to open and user is allowed to select the options for saving info and for notificationsopens(username,password)
#opens with post notfications while you're surfing in Instagram# Not recommended unless user is less active on Instgramlogin_info(username,password)
Logout of Instagram
#logs out by clearing all cookies in your test browserlogout()
Basic functions
like()#to like postunlike()#to unlike post. Works only when you like post or it perfoms like functionscreentime(intvalue)# Adjust the time you are on instagramexplore()# Opens explorefirst_post()# Opens first post in explore. Must be used after explorefollow()# Follows the account opened using first_post()unfollow()# Musyt follow to unfollow the account. Used after first_post() and follow() commandsexit_post()# Closes the post opened by using first_post()profile()# Opens profileclose_all()# Closes the chrome window by deleting cookiesaccount()# Opens an account. Use after first_post()ref()# Refreshes chromeend_scroll()# End scrollinit_scroll()# Home scrollpd()# Page downpu()# Page uphome()# Opens home
Example Code
frominstabotpyimport*x=login_no_info(username,password)explore()home()pofile()home()logout()
Email ID can also be given instead of your username
注意:本模块仅用于演示如何通过python使用instagram。小心使用。本模块的开发人员不对用户的任何错误或任何数据丢失负责
- 项目
标签: