- UID
- 72099
- 积分
- 8
- TBS
- 2
- 智商
- 15
- 节操
- 15
- 海贝
- 6
- 阅读权限
- 0
- 在线时间
- 2 小时
- 注册时间
- 2015-7-21
- 最后登录
- 2015-8-28
|
想自己写个回帖抢楼的工具(自己写的才是最合适的不是么)
不需要登录,直接使用cookies提交数据,代码如下(易语言写的):
.版本 2
.支持库 internet
.支持库 spec
cookies = 分割文本 (编辑框2.内容, #换行符, )
网址 = “http://tieba.baidu.com/f/commit/post/add”
子网页源码 = 到文本 (编码_编码转换对象 (HTTP读文件 (“http://tieba.baidu.com/p/” + 贴号 [K])))
fid = 文本_取出中间文本 (子网页源码, “fid:'”, “',”)
rich_text = 文本_取出中间文本 (子网页源码, “rich_text:'”, “',”)
floor_num = 到文本 (到数值 (回复数 [K]) + 1)
tbs源码 = 到文本 (网页_访问 (“http://tieba.baidu.com/dc/common/tbs”, 1, cookies [计数]))
tbs = 文本_取出中间文本 (tbs源码, #常量1, #常量2)
post数据 = “ie=utf-8&kw=” + 贴吧名 + “&fid=” + fid + “&tid=” + 贴号 [K] + “&vcode_md5=&floor_num=” + floor_num + “&rich_text=” + rich_text + “&tbs=” + tbs + “&content=” + 编码_URL编码 (“测试12345667”) + “%5Bbr&files=%5B%5D&mouse_pwd=109%2C111%2C110%2C101%2C112%2C110%2C109%2C100%2C105%2C85%2C109%2C112%2C108%2C112%2C109%2C112%2C108%2C112%2C109%2C112%2C108%2C112%2C109%2C112%2C108%2C112%2C109%2C112%2C108%2C85%2C109%2C108%2C108%2C105%2C110%2C106%2C85%2C109%2C101%2C110%2C108%2C112%2C109%2C108%2C100%2C108%2C” + 时间_取现行时间戳 () + “0&mouse_pwd_t=” + 时间_取现行时间戳 () + “&mouse_pwd_isclick=0&__type__=reply”
网页访问底层 (网址, “post”, post数据, cookies [计数])
调试输出 (到文本 (编码_编码转换对象 (网页访问底层 (网址, “post”, post数据, cookies [计数]))))
运行代码返回错误:{"no":308,"err_code":230308,"error":"","data":{"autoMsg":"","fid":1550627,"fname":"\u947f\u5a45\u59f3\u6fe1","tid":3274621579,"is_login":1,"content":"\u6d4b\u8bd512345667[br","vcode":{"need_vcode":0,"str_reason":"","captcha_vcode_str":"","captcha_code_type":0,"userstatevcode":0},"second_class_id":""}}
哪位大神帮我看看是哪里出错了,是提交参数错误还是cookies的问题?困扰我两天了,跪求!
cookies格式如下:BDUSS=ZYTFZJZmxtNFFUTGpUN3hDLS1TQXB0d0xtfnlKMUlJR24xTGRZZllta0U0Z05XQVFBQUFBJCQAAAAAAAAAAAEAAAD61hQWd3dlNDQyMDIwOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARV3FUEVdxVaz
|
|