使用一些基本功能的小型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。小心使用。本模块的开发人员不对用户的任何错误或任何数据丢失负责

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何使用数据库中的值填充p:selectOneMenu   Java/Junit中的异步单元测试一个非常简单但不成功的例子   在Debian上使用Java连接到MySQL   java测试时如何恢复表中的一条记录/行?   java如何将重点放在jbutton上而不是放在另一个jbutton上?   java我可以从HPROF文件中获取JVM标志吗?   java如何使用自定义比较器在2个集合上保留   java让stringTokenizer将一行文本拆分为预定义变量的最佳方法是什么   Kotlin Android/Java字符串日期时间格式,API21   exchange server EWS Java Api自动发现不工作   netbeans是Java新手,似乎无法修复错误;应为类、接口或枚举。274062   我正在尝试将一些scala代码转换为Java8,以创建新的Lambda和并行集合   流中的分配api(java)   用于串行通信的java Python字节数组