【 以下文字转载自 NewExpress 讨论区 】
发信人: e729 (Dreamroom), 信区: NewExpress
标 题: 请教python大拿一个问题
发信站: 水木社区 (Wed Apr 13 18:11:32 2022), 站内
我学习用python在水木发帖,使用requests模块上传pic都成功:
200 {"no":1,"name":"Q5zZPHxcFA3hWjd.jpg","size":119990,"exif":"","ajax_st":1,"ajax_code":"0005","ajax_msg":"操作成功"}
200 {"no":2,"name":"no5hh1.png","size":790233,"exif":"","ajax_st":1,"ajax_code":"0005","ajax_msg":"操作成功"}
然后再提交:
post_data = {
'subject': title,
'content': '[upload=1][/upload][upload=2][/upload]',
'signature': '0',
'id': '0'
}
结果也显示成功:
200 {"ajax_code":"0406","list":[{"text":"版面:贴图(Picture)","url":"/board/Picture"},{"text":"主题:中国最性感的十大女演员","url":"/article/Picture/2410761"},{"text":"水木社区","url":"/mainpage"}],"default":"/board/Picture","ajax_st":1,"ajax_msg":"发表成功"}
但是,在帖子里不能显示出上述两个pic,尝试了好多遍也没有找到原因,请各位指教。
--
FROM 42.248.39.*
我在浏览器发帖,成功后得到一个json如下:
{"ajax_code":"0406","list":[{"text":"版面:贴图(Picture)","url":"/board/Picture"},{"text":"主题:健身的妹子","url":"/article/Picture/2411866"},{"text":"水木社区","url":"/mainpage"}],"default":"/board/Picture","ajax_st":1,"ajax_msg":"发表成功"}
用代码发帖,能得到相同的响应。并没有看见你提到的页面呢。
这是我用代码发的帖:
https://www.mysmth.net/nForum/#!article/Picture/2411866
【 在 hongyan2022 的大作中提到: 】
: 发图成功的页面里有
: <img border="0" title="单击此查看原图" src="//static.mysmth.net/nForum/att/Bull/1828408/264/large" class="resizeable">
: 如果你的页面里没有,那么发贴时的引用方式不对
: ...................
--
FROM 42.249.23.*