零落 发表于 2021-1-15 11:39:31

用Python脚本自动给抖音小姐姐评论一个666

本帖最后由 零落 于 2021-1-15 13:32 编辑 <br /><br /><p style="line-height: 1.75em;"><span style="font-family: 微软雅黑, Microsoft YaHei; background-color: rgb(255, 255, 255); font-size: 10px; color: rgb(165, 165, 165);">文章来源:乐聚机器人王松博士《用Python脚本自动给抖音小姐姐评论一个666》</span></p><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); line-height: 1.75em; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="padding: 0px; max-width: 100%; font-family: 微软雅黑; font-size: 14px; box-sizing: border-box !important; overflow-wrap: break-word !important;">前一段时间写了一篇&nbsp;</span><a href="https://mp.weixin.qq.com/s?__biz=MzI0MTUwODI2OA==&mid=2247484740&idx=1&sn=6728984114d6493f190552c3bee23d95&chksm=e90bcf87de7c469100007253d9c02c38c2ccaee16b6df2afee2727c547aba583737e0483a1d9&scene=21&subscene=126&ascene=0&devicetype=android-28&version=2700033a&nettype=WIFI&abtest_cookie=BQABAAgACgALABIAEwAFAJ2GHgAklx4AWpkeAMOZHgDamR4AAAA=&lang=zh_CN&pass_ticket=AZPNVQaqXPcswdfJemERDmQboQA5ePh60UlH947K823RQYzPUhcjKPV80ZMnTDUL&wx_header=1#wechat_redirect" target="_blank" data-linktype="2" style="color: rgb(87, 107, 149); -webkit-tap-highlight-color: rgba(0, 0, 0, 0); cursor: pointer; font-family: 微软雅黑; padding: 0px; max-width: 100%; font-size: 14px; box-sizing: border-box !important; overflow-wrap: break-word !important; text-decoration: underline;"><span style="padding: 0px; max-width: 100%; font-size: 14px; box-sizing: border-box !important; overflow-wrap: break-word !important;">《抖音 Python 机器人,论如何在抖音上找到漂亮小姐姐?》</span></a><span style="padding: 0px; max-width: 100%; font-family: 微软雅黑; font-size: 14px; box-sizing: border-box !important; overflow-wrap: break-word !important;">,没想到有相当多的同学有着相同的需求!</span></p><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); line-height: 1.75em; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="padding: 0px; max-width: 100%; text-indent: 2em; letter-spacing: 0.544px; font-family: 微软雅黑; font-size: 14px; box-sizing: border-box !important; overflow-wrap: break-word !important;">大家皆为</span></p><p style="margin-top: 0px;margin-bottom: 0px;padding: 0px;max-width: 100%;clear: both;min-height: 1em;color: rgb(62, 62, 62);font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;font-size: 17px;letter-spacing: 0.544px;text-align: justify;text-indent: 34px;white-space: normal;background-color: rgb(255, 255, 255);box-sizing: border-box !important;overflow-wrap: break-word !important"><span style="padding: 0px; max-width: 100%; text-indent: 2em; letter-spacing: 0.544px; font-family: 微软雅黑; font-size: 14px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><br/></span></p><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-align: center; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="padding: 0px; max-width: 100%; text-indent: 2em; letter-spacing: 0.544px; font-family: 微软雅黑; font-size: 14px; box-sizing: border-box !important; overflow-wrap: break-word !important;"></span></p><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); box-sizing: border-box !important; overflow-wrap: break-word !important;"><br/></p><p style="padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="font-size: 14px;"><span style="margin: 0px; padding: 0px; max-width: 100%; text-indent: 2em; letter-spacing: 0.544px; font-family: 微软雅黑; box-sizing: border-box !important; overflow-wrap: break-word !important;">程序的基本思路请查阅原理与使用教程</span><span style="margin: 0px; padding: 0px; max-width: 100%; text-indent: 2em; letter-spacing: 0.544px; box-sizing: border-box !important; overflow-wrap: break-word !important;">①</span><span style="margin: 0px; padding: 0px; max-width: 100%; text-indent: 2em; letter-spacing: 0.544px; font-family: 微软雅黑; box-sizing: border-box !important; overflow-wrap: break-word !important;">。</span><br style="margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"/></span></p><p style="padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="margin: 0px; padding: 0px; max-width: 100%; font-family: 微软雅黑; font-size: 14px; box-sizing: border-box !important; overflow-wrap: break-word !important;">当程序在抖音上刷到一个漂亮小姐姐的时候就会自动点赞加关注。</span></p><p style="padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-align: center; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="margin: 0px; padding: 0px; max-width: 100%; font-family: 微软雅黑; font-size: 14px; box-sizing: border-box !important; overflow-wrap: break-word !important;"></span></p><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); box-sizing: border-box !important; overflow-wrap: break-word !important;"><br/></p><p style="padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="margin: 0px; padding: 0px; max-width: 100%; font-family: 微软雅黑; font-size: 14px; box-sizing: border-box !important; overflow-wrap: break-word !important;">作为一个闷骚程序员,见到漂亮小姐姐总是在背后默默点赞加关注。</span></p><p style="padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="margin: 0px; padding: 0px; max-width: 100%; font-family: 微软雅黑; font-size: 14px; box-sizing: border-box !important; overflow-wrap: break-word !important;">但是鲁迅曾经说,&nbsp;喜欢就要大声说出来!</span></p><p style="padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="margin: 0px; padding: 0px; max-width: 100%; font-family: 微软雅黑; font-size: 14px; box-sizing: border-box !important; overflow-wrap: break-word !important;">于是我又给Python脚本加上了这么一个自动评论的功能,代码会说话。</span></p><p style="padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); text-align: center; line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="margin: 0px; padding: 0px; max-width: 100%; font-family: 微软雅黑; font-size: 14px; box-sizing: border-box !important; overflow-wrap: break-word !important;"></span></p><p style="padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="margin: 0px; padding: 0px; max-width: 100%; font-family: 微软雅黑; font-size: 14px; box-sizing: border-box !important; overflow-wrap: break-word !important;"></span></p><p style="padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><br/></p><section style="margin:0px auto;" class="layout"><section style="margin-top: 2em; padding-top: 0.5em; padding-bottom: 0.5em; font-family: inherit; font-size: 1em; font-weight: inherit; white-space: normal; line-height: 22.4px; border-style: solid none none; border-top-width: 1px; border-top-color: rgb(204, 204, 204); text-decoration: inherit; color: rgb(166, 166, 166);"><section style="margin-top: -1.2em; text-align: center; border: none; line-height: 1.4;"><span style="padding: 8px 23px; border-radius: 25px; color: #FFFFFF; font-family: inherit; font-weight: inherit; text-decoration: inherit; border-color: #00589C; background-color: #00589C;" class="135brush" data-brushtype="text">一、自动实现步骤</span></section></section></section><p style="padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-size: 17px; letter-spacing: 0.544px; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="letter-spacing: 0.544px; text-align: justify; margin: 0px; padding: 0px; max-width: 100%; font-size: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="font-family: 微软雅黑; font-size: 14px; margin: 0px; padding: 0px; max-width: 100%;"><span style="margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">查阅</span>&nbsp;ADB 文档,</span><span style="font-family: 微软雅黑; font-size: 14px; margin: 0px; padding: 0px; max-width: 100%; color: rgb(26, 26, 26); letter-spacing: 0px; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">&nbsp;</span><span style="font-family: 微软雅黑; font-size: 14px; margin: 0px; padding: 0px; max-width: 100%; color: rgb(26, 26, 26); letter-spacing: 0px; background: rgb(246, 246, 246);">adb shell input text hello,world</span><span style="font-family: 微软雅黑; font-size: 14px; margin: 0px; padding: 0px; max-width: 100%;"><span style="margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;">命令可直接将字符串输入到</span>Android App 的输入框中,但是仅支持 Ascii 字符,即不能够输入中文字符。好在&nbsp;</span><span style="font-family: 微软雅黑; font-size: 14px; margin: 0px; padding: 0px; max-width: 100%; text-decoration-line: underline;">senzhk</span></span><span style="font-family: 微软雅黑; letter-spacing: 0.544px; text-align: justify; margin: 0px; padding: 0px; max-width: 100%; text-indent: 24px; text-decoration-line: underline; font-size: 12px; box-sizing: border-box !important; overflow-wrap: break-word !important;">②</span><span style="font-family: 微软雅黑; letter-spacing: 0.544px; text-align: justify; margin: 0px; padding: 0px; max-width: 100%; font-size: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="font-size: 14px; margin: 0px; padding: 0px; max-width: 100%;">写了一个</span>&nbsp;ADB 虚拟键盘输入法,输入法监听ADB广播事件接收 ADB发送的 Unicode 编码字符串,然后输入到文本框中,以此绕过这个ADB 的限制。</span></p><p style="padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="margin: 0px; padding: 0px; max-width: 100%; font-size: 14px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><strong style="margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><span style="font-size: 14px; margin: 0px; padding: 0px; max-width: 100%; font-family: 微软雅黑; box-sizing: border-box !important; overflow-wrap: break-word !important;"><br style="margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"/></span></strong></span></p><section style="margin:0px auto;" class="layout"><section style="margin-top: 2em; padding-top: 0.5em; padding-bottom: 0.5em; font-family: inherit; font-size: 1em; font-weight: inherit; white-space: normal; line-height: 22.4px; border-style: solid none none; border-top-width: 1px; border-top-color: rgb(204, 204, 204); text-decoration: inherit; color: rgb(166, 166, 166);"><section style="margin-top: -1.2em; text-align: center; border: none; line-height: 1.4;"><span style="padding: 8px 23px; border-radius: 25px; color: #FFFFFF; font-family: inherit; font-weight: inherit; text-decoration: inherit; border-color: #00589C; background-color: #00589C;" class="135brush" data-brushtype="text">二、操作步骤</span></section></section></section><p style="padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="font-size: 14px;"><span style="margin: 0px; padding: 0px; max-width: 100%; font-size: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="font-size: 14px; margin: 0px; padding: 0px; max-width: 100%; text-indent: 2em; letter-spacing: 0.544px; font-family: 微软雅黑;">1. 安卓手机安装&nbsp;</span>ADBKeyBoard.apk</span><span style="margin: 0px; padding: 0px; max-width: 100%; font-family: 微软雅黑; font-size: 12px; box-sizing: border-box !important; overflow-wrap: break-word !important;">③;</span></span></p><p style="padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-align: justify; white-space: normal; background-color: rgb(255, 255, 255); text-indent: 28px; line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="margin: 0px; padding: 0px; max-width: 100%; font-size: 14px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="font-size: 14px; margin: 0px; padding: 0px; max-width: 100%; font-family: 微软雅黑;">&nbsp;2. 将手机默认输入法切换为&nbsp;</span><span style="font-size: 14px; margin: 0px; padding: 0px; max-width: 100%; font-family: 宋体; color: rgb(26, 26, 26); letter-spacing: 0px; background: rgb(246, 246, 246);">ADB KeyBoard;</span></span></p><p style="padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); text-align: center; line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="margin: 0px; padding: 0px; max-width: 100%; font-family: 微软雅黑; font-size: 14px; box-sizing: border-box !important; overflow-wrap: break-word !important;"></span></p><p style="padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="margin: 0px; padding: 0px; max-width: 100%; font-family: 微软雅黑; font-size: 14px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="margin: 0px; padding: 0px; max-width: 100%; color: rgb(62, 62, 62); letter-spacing: 0.544px; text-align: justify; text-indent: 28px; background-color: rgb(255, 255, 255); font-size: 15px; font-family: 微软雅黑;">3. &nbsp;手机连上电脑,在输入框输入&nbsp;</span><span style="margin: 0px; padding: 0px; max-width: 100%; text-align: justify; text-indent: 28px; font-size: 15px; font-family: 微软雅黑; color: rgb(26, 26, 26); letter-spacing: 0px; background: rgb(246, 246, 246);">adb shell am broadcast -a ADB_INPUT_TEXT --es msg 可爱小姐姐你好呀,</span><span style="margin: 0px; padding: 0px; max-width: 100%; color: rgb(62, 62, 62); letter-spacing: 0.544px; text-align: justify; text-indent: 28px; background-color: rgb(255, 255, 255); font-size: 15px; font-family: 微软雅黑;">即可输入中文字符。</span></span></p><p style="padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><br/></p><section style="margin:0px auto;" class="layout"><section style="margin-top: 2em; padding-top: 0.5em; padding-bottom: 0.5em; font-family: inherit; font-size: 1em; font-weight: inherit; white-space: normal; line-height: 22.4px; border-style: solid none none; border-top-width: 1px; border-top-color: rgb(204, 204, 204); text-decoration: inherit; color: rgb(166, 166, 166);"><section style="margin-top: -1.2em; text-align: center; border: none; line-height: 1.4;"><span style="padding: 8px 23px; border-radius: 25px; color: #FFFFFF; font-family: inherit; font-weight: inherit; text-decoration: inherit; border-color: #00589C; background-color: #00589C;" class="135brush" data-brushtype="text">三、代码实现</span></section></section></section><p style="padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="font-size: 14px;"><span style="margin: 0px; padding: 0px; max-width: 100%; font-size: 15px; font-family: 微软雅黑; box-sizing: border-box !important; overflow-wrap: break-word !important;">完整代码请参考&nbsp;</span><span style="margin: 0px; padding: 0px; max-width: 100%; text-indent: 0px; letter-spacing: 0.544px; font-size: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="font-size: 14px; margin: 0px; padding: 0px; max-width: 100%; font-family: 微软雅黑;">wangshub/Douyin-Bo</span>t</span><span style="margin: 0px; padding: 0px; max-width: 100%; text-indent: 0px; letter-spacing: 0.544px; font-size: 12px; box-sizing: border-box !important; overflow-wrap: break-word !important;">④</span></span></p><p style="padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-align: center; white-space: normal; background: rgb(255, 255, 255); line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><img class="" data-backh="274" data-backw="526" data-before-oversubscription-url="https://bbs.lejurobot.com/plugin.php?id=wcn_editor:wx_img&url=https://mmbiz.qpic.cn/mmbiz_png/ujIIpBiauu2phdIic7Is1j7ndgXT8I9tYfAv51P2BwGPGia3gCgQ4ibLTiaVVANCNuiaceNzZIKjiawibqgkZoWnUFcqhg/0?wx_fmt=png" data-copyright="0" data-ratio="0.5215827338129496" data-s="300,640" src="https://bbs.lejurobot.com/plugin.php?id=wcn_editor:wx_img&url=https://mmbiz.qpic.cn/mmbiz_png/ujIIpBiauu2phdIic7Is1j7ndgXT8I9tYfAv51P2BwGPGia3gCgQ4ibLTiaVVANCNuiaceNzZIKjiawibqgkZoWnUFcqhg/640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1" data-type="png" data-w="" _width="472px" crossorigin="anonymous" alt="图片" data-fail="0" style="margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important; height: auto !important; text-align: center; text-indent: 2em; letter-spacing: 0.544px; width: 472px !important; visibility: visible !important;"/></p><p style="padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; white-space: normal; background: rgb(255, 255, 255); line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><br/></p><section style="margin:0px auto;" class="layout"><section style="margin-top: 2em; padding-top: 0.5em; padding-bottom: 0.5em; font-family: inherit; font-size: 1em; font-weight: inherit; white-space: normal; line-height: 22.4px; border-style: solid none none; border-top-width: 1px; border-top-color: rgb(204, 204, 204); text-decoration: inherit; color: rgb(166, 166, 166);"><section style="margin-top: -1.2em; text-align: center; border: none; line-height: 1.4;"><span style="padding: 8px 23px; border-radius: 25px; color: #FFFFFF; font-family: inherit; font-weight: inherit; text-decoration: inherit; border-color: #00589C; background-color: #00589C;" class="135brush" data-brushtype="text">四、存在的问题</span></section></section></section><p style="margin-left: 24px; padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="margin: 0px; padding: 0px; max-width: 100%; font-family: 微软雅黑; font-size: 14px; box-sizing: border-box !important; overflow-wrap: break-word !important;">·&nbsp;ADB 不支持 Unicode 编码,所以需要用 ADB KeyBoard 操作比较繁琐;</span></p><p style="margin-left: 24px; padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="margin: 0px; padding: 0px; max-width: 100%; font-family: 微软雅黑; font-size: 14px; box-sizing: border-box !important; overflow-wrap: break-word !important;">·&nbsp;再者&nbsp;ADB 是对屏幕坐标点击,存在屏幕分辨率适配的硬伤;</span></p><p style="margin-left: 24px; padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="font-size: 14px;"><span style="margin: 0px; padding: 0px; max-width: 100%; font-size: 15px; font-family: 微软雅黑; box-sizing: border-box !important; overflow-wrap: break-word !important;">·&nbsp;<span style="font-size: 14px; margin: 0px; padding: 0px; max-width: 100%;">针对上面的两个问题,可以使用</span>&nbsp;App 自动化测试工具&nbsp;Appium</span><span style="margin: 0px; padding: 0px; max-width: 100%; font-family: 微软雅黑; font-size: 12px; box-sizing: border-box !important; overflow-wrap: break-word !important;">&nbsp;<span style="font-size: 14px; margin: 0px; padding: 0px; max-width: 100%; text-indent: 24px;">⑤</span></span><span style="margin: 0px; padding: 0px; max-width: 100%; font-size: 15px; font-family: 微软雅黑; box-sizing: border-box !important; overflow-wrap: break-word !important;">解决,后面再找机会把坑填上(懒癌发作)。</span></span></p><p style="margin-left: 24px; padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="font-size: 14px;"><span style="margin: 0px; padding: 0px; max-width: 100%; font-size: 15px; font-family: 微软雅黑; box-sizing: border-box !important; overflow-wrap: break-word !important;"><br/></span></span></p><p style="margin-left: 24px; padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="font-size: 14px;"><span style="margin: 0px; padding: 0px; max-width: 100%; font-size: 15px; font-family: 微软雅黑; box-sizing: border-box !important; overflow-wrap: break-word !important;"><br/></span></span></p><section style="margin:0px auto;" class="layout"><section style="margin-top: 2em; padding-top: 0.5em; padding-bottom: 0.5em; font-family: inherit; font-size: 1em; font-weight: inherit; white-space: normal; line-height: 22.4px; border-style: solid none none; border-top-width: 1px; border-top-color: rgb(204, 204, 204); text-decoration: inherit; color: rgb(166, 166, 166);"><section style="margin-top: -1.2em; text-align: center; border: none; line-height: 1.4;"><span style="padding: 8px 23px; border-radius: 25px; color: #FFFFFF; font-family: inherit; font-weight: inherit; text-decoration: inherit; border-color: #00589C; background-color: #00589C;" class="135brush" data-brushtype="text">五、总结</span></section></section></section><p style="margin-left: 24px; padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="font-family: 微软雅黑; font-size: 14px; letter-spacing: 0.544px;">·&nbsp;小孩子不要玩抖音&nbsp;!小孩子不要玩抖音!</span></p><p style="margin-left: 24px; padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="margin: 0px; padding: 0px; max-width: 100%; font-family: 微软雅黑; font-size: 14px; box-sizing: border-box !important; overflow-wrap: break-word !important;">·&nbsp;赞美别人可以使身心舒畅,点赞也是&nbsp;~</span></p><p style="margin-left: 24px; padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="margin: 0px; padding: 0px; max-width: 100%; font-family: 微软雅黑; font-size: 14px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><br/></span></p><p style="margin-left: 24px; padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="margin: 0px; padding: 0px; max-width: 100%; font-family: 微软雅黑; font-size: 14px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><br/></span></p><section style="margin-top: 10px; margin-bottom: 10px; position: static; box-sizing: border-box;"><section style="line-height: 1.5em; border-width: 2px; border-style: solid; border-color: rgb(29, 147, 197); border-radius: 0.8em; box-sizing: border-box;"><section style="padding-top: 10px; padding-right: 10px; padding-left: 10px; box-sizing: border-box;"><section style="width: 0.5em; height: 0.5em; float: left; border-radius: 100%; background-color: rgb(29, 147, 197); box-sizing: border-box;"></section><section style="width: 0.5em; height: 0.5em; float: right; border-radius: 100%; background-color: rgb(29, 147, 197); box-sizing: border-box;"></section></section><section style="padding: 10px; box-sizing: border-box;"><section style=" position: static; box-sizing: border-box; text-align: left; "><section style="width: 100%; padding: 5px 10px; display: inline-block; font-size: 24px; color: rgb(29, 147, 197); box-sizing: border-box;" data-width="100%"><p style="padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; white-space: normal; font-size: 14px; background-color: rgb(255, 255, 255); line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;"><strong style="margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; word-wrap: break-word !important;"><span style="margin: 0px; padding: 0px; max-width: 100%; background-color: rgb(254, 254, 254); color: inherit; text-align: center; box-sizing: border-box !important; overflow-wrap: break-word !important;">文中标记网址:</span></strong></span></p><p style="padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; letter-spacing: 0.544px; text-align: justify; text-indent: 34px; white-space: normal; font-size: 14px; background-color: rgb(255, 255, 255); line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="margin: 0px; padding: 0px; max-width: 100%; font-family: 微软雅黑; letter-spacing: 0px; text-indent: 2em; box-sizing: border-box !important; overflow-wrap: break-word !important;"></span></p><p style="margin-left: 24px; padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="margin: 0px; padding: 0px; max-width: 100%; font-family: 微软雅黑; font-size: 14px; box-sizing: border-box !important; overflow-wrap: break-word !important;">&nbsp;①https://github.com/wangshub/Douyin-Bot#%E5%8E%9F%E7%90%86</span></p><p style="margin-left: 24px; padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="margin: 0px; padding: 0px; max-width: 100%; font-family: 微软雅黑; font-size: 14px; box-sizing: border-box !important; overflow-wrap: break-word !important;">&nbsp;②https://github.com/senzhk/ADBKeyBoard</span></p><p style="margin-left: 24px; padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="margin: 0px; padding: 0px; max-width: 100%; font-family: 微软雅黑; font-size: 12px; text-indent: 2em; letter-spacing: 0.544px; box-sizing: border-box !important; overflow-wrap: break-word !important;">&nbsp;③https://github.com/wangshub/Douyin-Bot/blob/master/apk/ADBKeyBoard.apk</span></p><p style="margin-left: 24px; padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="margin: 0px; padding: 0px; max-width: 100%; font-family: 微软雅黑; text-indent: 2em; letter-spacing: 0.544px; font-size: 14px; box-sizing: border-box !important; overflow-wrap: break-word !important;">④http://link.zhihu.com/?target=https%3A//github.com/wangshub/Douyin-Bot</span></p><p style="margin-left: 24px; padding: 0px; max-width: 100%; clear: both; min-height: 1em; color: rgb(62, 62, 62); font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif; font-size: 17px; letter-spacing: 0.544px; text-indent: 34px; white-space: normal; background-color: rgb(255, 255, 255); line-height: 1.75em; margin-bottom: 15px; margin-top: 15px; box-sizing: border-box !important; overflow-wrap: break-word !important;"><span style="margin: 0px; padding: 0px; max-width: 100%; font-family: 微软雅黑; font-size: 14px; box-sizing: border-box !important; overflow-wrap: break-word !important;">⑤http://appium.io/</span></p><p style="clear: none; box-sizing: border-box; letter-spacing: 2px;"><br/></p></section></section></section><section style="padding-right: 10px; padding-bottom: 15px; padding-left: 10px; box-sizing: border-box;"><section style="width: 0.5em; height: 0.5em; float: left; border-radius: 100%; background-color: rgb(29, 147, 197); box-sizing: border-box;"></section><section style="width: 0.5em; height: 0.5em; float: right; border-radius: 100%; background-color: rgb(29, 147, 197); box-sizing: border-box;"><br/></section></section></section></section><link rel="stylesheet" href="//bbs.lejurobot.com/source/plugin/wcn_editor/public/wcn_editor_fit.css?v134_iSW" id="wcn_editor_css"/>
页: [1]
查看完整版本: 用Python脚本自动给抖音小姐姐评论一个666