Instagram蟒蛇机器人

instabot-p的Python项目详细描述


新Instabot

neo instabot是一款非常轻巧的instagram机器人,使用的是未注册的web api。与其他机器人程序不同,instabot.py不需要notselenium或webdriver。相反,它通过简单的http请求与api交互。它运行在大多数系统上,包括覆盆子皮。

Chat on TelegramLatest version onSupported Python versionsTravis Pipelines build status

要求

  • python v3.6或更高版本
  • PIP V18或更高版本

快速入门

  • 确保安装了python 3.6或更高版本

    • python3 --version

在windows上,您可能必须使用python而不使用版本(3)后缀。有经验的用户应该使用virtualenv。

  • 从pypi存储库安装instabot.py

    • python3 -m pip install neo-instabot
  • 启动bot

    • neo-instabotpython3 -m instabot
    • neo-instabot -c myconfiguration.ymlpython3 -m instabot -c myconfiguration.yml
  • **配置**

通过运行neo-instabot,bot从当前目录中的instabot.config.yml读取其配置。 您可以使用不同的配置运行bot neo-instabot -c myconfiguration.yml

升级

  • python3 -m pip install neo-instabot --no-cache-dir --upgrade
  • pip3 install neo-instabot --no-cache-dir --upgrade

安装方法

推荐:来自pypi:(稳定)

  • python3 -m pip install neo-instabot

来源:(出血边缘)

  • python3 -m pip install git+https://github.com/yurilaaziz/neo-instabot

参数

ParameterTypeDescriptionDefault value
loginstrYour instagram username
passwordstrYour instagram password
start_at_hintStart program at the hour0
start_at_mintStart program at the min0
end_at_hintEnd program at the hour23
end_at_mintEnd program at the min59
databasedictContains the database configuration{"type": "sql", "connection_string": "sqlite:///{{login}}.db"}
session_filestrchange the name of session file so to avoid having to login every time. Set False to disable."username.session"
like_per_dayintDEPRECATED, WILL BE REMOVED SOON, REPLACED BY like_per_run
like_per_runintNumber of photos to like per day (over 1000 may cause throttling)1000
media_max_likeintMaximum number of likes on photos to like (set to 0 to disable)0
media_min_likeintMinimum number of likes on photos to like (set to 0 to disable)0
follow_per_dayintDEPRECATED, WILL BE REMOVED SOON, REPLACED BY follow_per_run0
follow_per_runintUsers to follow per day0
follow_timeintSeconds to wait before unfollowing5 * 60 * 60
user_min_followintCheck user before following them if they have X minimum of followers. Set 0 to disable0
user_max_followintCheck user before following them if they have X maximum of followers. Set 0 to disable0
follow_time_enabledboolREMOVED, TO DISBALE Follow_time, just set it to 0--
unfollow_per_dayintDEPRECATED, WILL BE REMOVED SOON, REPLACED BY unfollow_per_run0
unfollow_per_runintUsers to unfollow per day0
unfollow_recent_feedboolIf enabled, will populate database with users from recent feed and unfollow if they meet the conditions. Disable if you only want the bot to unfollow people it has previously followed.True
unlike_per_dayintDEPRECATED, WILL BE REMOVED SOON, REPLACED BY unlike_per_run0
unlike_per_runintNumber of media to unlike that the bot has previously liked. Set to 0 to disable.0
time_till_unlikeintHow long to wait after liking media before unliking them.3 * 24 * 60 * 60 (3 days)
comments_per_dayintComments to post per day0
comment_list[[str]]List of word lists for comment generation. @username@ will be replaced by the media owner's username[['this', 'your'], ['photo', 'picture', 'pic', 'shot'], ['is', 'looks', 'is really'], ['great', 'super', 'good'], ['.', '...', '!', '!!']]
tag_list[str]Tags to use for finding posts by hasthag or location(l:locationid from e.g. https://www.instagram.com/explore/locations/212999109/los-angeles-california/)['cat', 'car', 'dog', 'l:212999109']
keywords[str]Words to use for finding profiles with username or biography contain these words[]
tag_blacklist[str]Tags to ignore when liking posts[]
user_blacklist{str: str}Users whose posts to ignore. Example: ^{} type only the key and leave value empty -- it will be populated with userids on startup.{}
max_like_for_one_tagintHow many media of a given tag to like at once (out of 21)5
unfollow_break_minintMinimum seconds to break between unfollows15
unfollow_break_maxintMaximum seconds to break between unfollows30
log_modintLogging target (0 log to console, 1 log to file, 2 no log.)0
proxies (deprecated)dictAccess instagram through a proxy. {"http":"http://IP:PORT", "https":"http://IP:PORT"} (host:port or user:password@host:port)
proxy_ipdictHTTP Proxy IP address
proxy_portintHTTP Proxy Port
proxy_userstrHTTP Proxy username
proxy_passwordstrHTTP Proxy password
unfollow_not_followingboolUnfollow Condition: Unfollow those who do not follow you backTrue
unfollow_inactiveboolUnfollow Condition: Unfollow those who have not posted in a while (inactive)True
unfollow_probably_fakeboolUnfollow Condition: Unfollow accounts which skewed follow/follower ratio (probably fake)True
unfollow_selebgramboolUnfollow Condition: Unfollow (celebrity) accounts with too many followers and not enough followingFalse
unfollow_everyoneboolUnfollow Condition: Will unfollow everyone in unfollow queue (wildcard condition)False

贡献

请随时贡献和提交公关要求。感谢大家的帮助。查找标签needs help的问题。

带yaml配置的instabot

默认情况下,instabot会查找配置文件(instabot.config.yml) 可以通过使用完整路径导出environment varible来更改它

exportINSTABOT_CONFIG_FILE=instabot2.config.yml
---login :"username"password :"password"debug:1#Send INFO notification to Telegram channel logging.handlers.telegram:level:INFOclass:telegram_handler.TelegramHandlertoken:__YOUR__CHANNEL__TOKEN__chat_id:__CHAT_ID__logging.loggers.InstaBot.handlers:-telegram-consolefollow_time:1200unfollow_per_day:1000follow_per_day:1000

Create Telegram bot for instabot

博客

社区

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

推荐PyPI第三方库


热门话题
java如何在创建对话框时设置模糊背景   java支持clojure中的xml和json REST响应   java在Android中通过多个JSON对象循环   java如何创建T类型的新对象   Java应用程序的设计   java使用GridView、适配器和毕加索制作流行电影应用程序   java在映射中交换值   java在同一活动/布局中多次使用同一片段   使用FixedLengthTokenizer使用java Spring FlatFileItemReader   javajavax。xml。ws。WebServiceException:javax。xml。肥皂SOAPException:错误代码QName必须是命名空间限定的!在weblogic server 12c中部署时   当我在构造函数中调用java Autowired属性时,该属性为null   线程“main”java中的linux异常。网BindException:地址已在使用中   java检查两个日期周期是否重叠   有没有办法通过安卓应用程序自动检测java服务器应用程序是否在线?   java检查2D数组中4个连续相同的对角线元素(连接4个游戏)   向Java数组添加数据   java组织。弹性搜索。客户运输NoNodeAvailableException:配置的节点均不可用:[]