cbastienbaron / twitter-bot-net
此包已弃用且不再维护。未建议替代包。
0.0.1
2018-12-27 10:43 UTC
Requires
- php: ^7.1.8
- ext-iconv: *
- guzzlehttp/guzzle: ^6.3
- guzzlehttp/oauth-subscriber: ^0.3.0
- symfony/console: ~4.0
- symfony/flex: ^1.0
- symfony/framework-bundle: ^4.0
- symfony/monolog-bundle: ^3.2|~4.0
- symfony/swiftmailer-bundle: ^3.2|~4.0
- symfony/var-dumper: ~4.0
- symfony/yaml: ~4.0
Requires (Dev)
- symfony/dotenv: ~4.0
Conflicts
Replaces
- dev-master
- 0.0.1
- dev-dependabot/composer/symfony/flex-1.13.3
- dev-dependabot/composer/symfony/flex-1.13.2
- dev-dependabot/add-v2-config-file
- dev-dependabot/composer/symfony/yaml-4.4.18
- dev-dependabot/composer/symfony/dotenv-4.4.18
- dev-dependabot/composer/symfony/var-dumper-4.4.18
- dev-dependabot/composer/symfony/monolog-bundle-3.6.0
- dev-dependabot/composer/guzzlehttp/oauth-subscriber-0.4.0
- dev-dependabot/composer/guzzlehttp/guzzle-6.5.2
- dev-dependabot/composer/symfony/console-4.2.12
- dev-dependabot/composer/symfony/framework-bundle-4.0.15
- dev-dependabot/composer/symfony/swiftmailer-bundle-3.3.1
This package is auto-updated.
Last update: 2021-05-20 06:41:13 UTC
README
这是一个twitter机器人搜索竞赛类型的 rt to #win
,转发并赢
,转发有机会赢
,赢取酷炫物品...
特性
- 扫描竞赛推文
- 转发以参与竞赛
- 如果需要,关注这些人
- 向这个人表示感谢(随机字符串)并在回复中添加GIF
安装
从头开始
git clone git@github.com:cbastienbaron/twitter-bot-net.git \ && cd twitter-bot-net \ && composer install
使用composer (https://getcomposer.org/)
composer create-project cbastienbaron/twitter-bot-net
使用树莓派/docker(本仓库中包含Dockerfile,方便懒人 :) (https://get.docker.com/)
docker build -t cbastien/bot-farm . docker run -it -d -v $(pwd)/var/data/:/app/var/data --name bot-contest cbastien/bot-farm bin/console bot:contest
配置
cat .env # This file is a "template" of which env vars need to be defined for your application # Copy this file to .env file for development, create environment variables when deploying to production # https://symfony.com.cn/doc/current/best_practices/configuration.html#infrastructure-related-configuration TWITTER_CONSUMER_KEY=****** TWITTER_CONSUMER_SECRET=****** TWITTER_TOKEN=****** TWITTER_TOKEN_SECRET=****** GIPHY_API_KEY=SMAU6qz8l1aIxU980R5irqDMTh5hMqR5 ###> symfony/swiftmailer-bundle ### # For Gmail as a transport, use: "gmail://username:password@localhost" # For a generic SMTP server, use: "smtp://:25?encryption=&auth_mode=" # Delivery is disabled by default via "null://" MAILER_URL=null:// MAILER_TO=replace+botnet@gmail.com MAILER_FROM=replace+botnet@gmail.com ###< symfony/swiftmailer-bundle ### ###> symfony/framework-bundle ### APP_ENV=dev APP_SECRET=bee0463b64a5bc78bca052ed792902a1 #TRUSTED_PROXIES=127.0.0.1,127.0.0.2 #TRUSTED_HOSTS=localhost,example.com ###< symfony/framework-bundle ###
创建twitter应用账号: https://developer.twitter.com/apps/ 并填写 .env
变量 var GIPHY_API_KEY
测试目的下保持原样
运行
bin/console bot:contest