码迷,mamicode.com
首页 > 其他好文 > 详细

模拟登陆qq空间发说说

时间:2018-09-03 02:30:16      阅读:278      评论:0      收藏:0      [点我收藏+]

标签:ram   ota   main   post   host   apple   ESS   url   imp   

import requests

# network find this
"https://user.qzone.qq.com/proxy/domain/taotao.qzone.qq.com/cgi-bin/emotion_cgi_publish_v6?" "qzonetoken=470760640509be33e4600487e349de76ff1e48aa6e1792a46c3e5f3b9c463804b791aac1b0d294bfbe&" "g_tk=1049293860"

url = "https://user.qzone.qq.com/proxy/domain/taotao.qzone.qq.com/cgi-bin/emotion_cgi_publish_v6?"       "qzonetoken=8e170afa3ebb5ef748b6f419498509c479fafa8a146a295ed3136d2ac9fc8565b314bd5859e65d295c&"       "g_tk=1049293860"

headers = {
    "user-agent":"Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)"
                  " Chrome/67.0.3396.99 Safari/537.36",
    "cookie":"take your cookie",
}

# 此为仅自己可见
# 将所有的qq换成你的qq number,qzreferrer中只换最后一个
data = {
    "syn_tweet_verson":"1",
    "paramstr":"1",
    "con":"this is from my spider111",
    "feedversion":"1",
    "ver":"1",
    "ugc_right":"64", # 谁可见就此不同
    "to_sign":"0",
    "hostuin":"qq",
    "code_version":"1",
    "format":"fs",
    "qzreferrer":"https://user.qzone.qq.com/qq/",
}

# 所有人可见
data_open2all = {
    "syn_tweet_verson":"1",
    "paramstr":"1",
    "con":"this is to all test",
    "feedversion":"1",
    "ver":"1",
    "ugc_right":"1",
    "to_sign":"0",
    "hostuin":"qq",
    "code_version":"1",
    "format":"fs",
    "qzreferrer":"https://user.qzone.qq.com/qq/"
}

s = requests.Session()

response = s.post(url,headers=headers,data=data_open2all)

  

模拟登陆qq空间发说说

标签:ram   ota   main   post   host   apple   ESS   url   imp   

原文地址:https://www.cnblogs.com/whz0215/p/9576329.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!