Created
May 3, 2017 02:10
-
-
Save luxin88/a0d7b9c381fc970ade4f76c435bc49eb to your computer and use it in GitHub Desktop.
requests post数据
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import requests | |
allList = [] | |
for i in range(1, 23): | |
listPayload = dict(action="loadvoteoptionbypage", guid="2cdb51ca-ef8a-f83d-9fc6-28341591d747", | |
tpldiyfile="viewvotewx.tpl", page=i) | |
r = requests.post(u'http://m138082.nofollow.ax.mvote.cn/op.php', data=listPayload) | |
item = r.json() | |
voteList = [] | |
voteList.extend(item[u'retinfo'][u'list'][u'left']) | |
voteList.extend(item[u'retinfo'][u'list'][u'right']) | |
for user in voteList: | |
allList.append(user[u'pageurl']) | |
print allList |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment