awesome-python-login-model
awesome-python-login-model copied to clipboard
求解惑
def getUUID(): global uuid, session
url = 'https://login.weixin.qq.com/jslogin'
params = {
'appid': 'wx782c26e4c19acffb',
'fun': 'new',
'lang': 'zh_CN',
'_': int(time.time()),
}
请问 params 里面的参数是怎么获取的。我放在我本地运行总是报错。获取不到对的结果
re库
On Sat, Apr 13, 2019, 3:12 PM shenxianxgg [email protected] wrote:
def getUUID(): global uuid, session
url = 'https://login.weixin.qq.com/jslogin'
params = {
'appid': 'wx782c26e4c19acffb', 'fun': 'new', 'lang': 'zh_CN', '_': int(time.time()),
}
请问 params 里面的参数是怎么获取的。我放在我本地运行总是报错。获取不到对的结果
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/CriseLYJ/awesome-python-login-model/issues/52, or mute the thread https://github.com/notifications/unsubscribe-auth/ApI2hJqfsZX7ILE9jb_vfhPTU24Mbqoxks5vgYN5gaJpZM4ct5GK .
找到原因了。是因为我代码的缩进有问题
session = requests.session() url = 'https://login.weixin.qq.com/jslogin' params = { 'appid': 'wx782c26e4c19acffb', 'fun': 'new', 'lang': 'zh_CN', '_': int(time.time()), } response = session.get(url) print(response.content.decode('utf-8')) 这样子就可以生效了。
re库 …
代码缩进问题
请问大佬 appid怎么取到的? 怎么知道访问这个地址需要传入那些参数呢?
请问大佬 appid怎么取到的? 怎么知道访问这个地址需要传入那些参数呢?
1.第一个问题不太清楚你在弄哪个接口.
2.第二个问题,你找到请求的地址,查看请求头,就能确定需要哪些参数,需要注意的是,get请求的参数在网址中,如果用requests
库的话,可以将参数放在
params={"key": "value"}
requests.get(url, params=params) # params参数中
请问大佬 appid怎么取到的? 怎么知道访问这个地址需要传入那些参数呢?
1.第一个问题不太清楚你在弄哪个接口. 2.第二个问题,你找到请求的地址,查看请求头,就能确定需要哪些参数,需要注意的是,get请求的参数在网址中,如果用
requests
库的话,可以将参数放在params={"key": "value"}
requests.get(url, params=params) # params参数中
根据您讲的完全没看出来定义这个方法传入的这几个参数的意义 😳 def getUUID(): global uuid, session
url = 'https://login.weixin.qq.com/jslogin'
params = {
'appid': 'wx782c26e4c19acffb',
'fun': 'new',
'lang': 'zh_CN',
'_': int(time.time()),
}
response = session.get(url, params=params)
# 用session对象发出一个get请求,获取cookies
查看headers截图
请问大佬 appid怎么取到的? 怎么知道访问这个地址需要传入那些参数呢?
1.第一个问题不太清楚你在弄哪个接口. 2.第二个问题,你找到请求的地址,查看请求头,就能确定需要哪些参数,需要注意的是,get请求的参数在网址中,如果用
requests
库的话,可以将参数放在params={"key": "value"}
requests.get(url, params=params) # params参数中
根据您讲的完全没看出来定义这个方法传入的这几个参数的意义 😳 def getUUID(): global uuid, session
url = 'https://login.weixin.qq.com/jslogin' params = { 'appid': 'wx782c26e4c19acffb', 'fun': 'new', 'lang': 'zh_CN', '_': int(time.time()), } response = session.get(url, params=params) # 用session对象发出一个get请求,获取cookies
查看headers截图
请求头下面还有其他部分, 往下滑动,可以看到参数
请问大佬 appid怎么取到的? 怎么知道访问这个地址需要传入那些参数呢?
1.第一个问题不太清楚你在弄哪个接口. 2.第二个问题,你找到请求的地址,查看请求头,就能确定需要哪些参数,需要注意的是,get请求的参数在网址中,如果用
requests
库的话,可以将参数放在params={"key": "value"}
requests.get(url, params=params) # params参数中
根据您讲的完全没看出来定义这个方法传入的这几个参数的意义 😳 def getUUID(): global uuid, session
url = 'https://login.weixin.qq.com/jslogin' params = { 'appid': 'wx782c26e4c19acffb', 'fun': 'new', 'lang': 'zh_CN', '_': int(time.time()), } response = session.get(url, params=params) # 用session对象发出一个get请求,获取cookies
查看headers截图
请求头下面还有其他部分, 往下滑动,可以看到参数
没有了。 到底部了 😢
请问大佬 appid怎么取到的? 怎么知道访问这个地址需要传入那些参数呢?
1.第一个问题不太清楚你在弄哪个接口. 2.第二个问题,你找到请求的地址,查看请求头,就能确定需要哪些参数,需要注意的是,get请求的参数在网址中,如果用
requests
库的话,可以将参数放在params={"key": "value"}
requests.get(url, params=params) # params参数中
根据您讲的完全没看出来定义这个方法传入的这几个参数的意义 😳 def getUUID(): global uuid, session
url = 'https://login.weixin.qq.com/jslogin' params = { 'appid': 'wx782c26e4c19acffb', 'fun': 'new', 'lang': 'zh_CN', '_': int(time.time()), } response = session.get(url, params=params) # 用session对象发出一个get请求,获取cookies
查看headers截图
请求头下面还有其他部分, 往下滑动,可以看到参数
没有了。 到底部了 😢
url部分呢
请问大佬 appid怎么取到的? 怎么知道访问这个地址需要传入那些参数呢?
1.第一个问题不太清楚你在弄哪个接口. 2.第二个问题,你找到请求的地址,查看请求头,就能确定需要哪些参数,需要注意的是,get请求的参数在网址中,如果用
requests
库的话,可以将参数放在params={"key": "value"}
requests.get(url, params=params) # params参数中
根据您讲的完全没看出来定义这个方法传入的这几个参数的意义 😳 def getUUID(): global uuid, session
url = 'https://login.weixin.qq.com/jslogin' params = { 'appid': 'wx782c26e4c19acffb', 'fun': 'new', 'lang': 'zh_CN', '_': int(time.time()), } response = session.get(url, params=params) # 用session对象发出一个get请求,获取cookies
查看headers截图
请求头下面还有其他部分, 往下滑动,可以看到参数
没有了。 到底部了 😢
url部分呢 也没有
请问大佬 appid怎么取到的? 怎么知道访问这个地址需要传入那些参数呢?
1.第一个问题不太清楚你在弄哪个接口. 2.第二个问题,你找到请求的地址,查看请求头,就能确定需要哪些参数,需要注意的是,get请求的参数在网址中,如果用
requests
库的话,可以将参数放在params={"key": "value"}
requests.get(url, params=params) # params参数中
根据您讲的完全没看出来定义这个方法传入的这几个参数的意义 😳 def getUUID(): global uuid, session
url = 'https://login.weixin.qq.com/jslogin' params = { 'appid': 'wx782c26e4c19acffb', 'fun': 'new', 'lang': 'zh_CN', '_': int(time.time()), } response = session.get(url, params=params) # 用session对象发出一个get请求,获取cookies
查看headers截图
请求头下面还有其他部分, 往下滑动,可以看到参数
没有了。 到底部了 😢
url部分呢 也没有
![]()
..源网址错了...不是这个网址,肯定是wx登录页面的网址呀..怎么会是这个...
请问大佬 appid怎么取到的? 怎么知道访问这个地址需要传入那些参数呢?
1.第一个问题不太清楚你在弄哪个接口. 2.第二个问题,你找到请求的地址,查看请求头,就能确定需要哪些参数,需要注意的是,get请求的参数在网址中,如果用
requests
库的话,可以将参数放在params={"key": "value"}
requests.get(url, params=params) # params参数中
根据您讲的完全没看出来定义这个方法传入的这几个参数的意义 😳 def getUUID(): global uuid, session
url = 'https://login.weixin.qq.com/jslogin' params = { 'appid': 'wx782c26e4c19acffb', 'fun': 'new', 'lang': 'zh_CN', '_': int(time.time()), } response = session.get(url, params=params) # 用session对象发出一个get请求,获取cookies
查看headers截图
请求头下面还有其他部分, 往下滑动,可以看到参数
没有了。 到底部了 😢
url部分呢 也没有
![]()
..源网址错了...不是这个网址,肯定是wx登录页面的网址呀..怎么会是这个...
你可以看下webweixin的源码。就是模拟微信登陆的这个。getUUID里面的这个方法
请问大佬 appid怎么取到的? 怎么知道访问这个地址需要传入那些参数呢?
我看了一下 是没有给分析过程,所以可能不太清楚参数。你需要分析过程吗?昨天在写提取教程,没来得及回复。
如果可以的话 最好给一份
------------------ 原始邮件 ------------------ 发件人: "Dustyposa"[email protected]; 发送时间: 2019年4月15日(星期一) 中午1:26 收件人: "CriseLYJ/awesome-python-login-model"[email protected]; 抄送: "upperone"[email protected]; "Author"[email protected]; 主题: Re: [CriseLYJ/awesome-python-login-model] 求解惑 (#52)
请问大佬 appid怎么取到的? 怎么知道访问这个地址需要传入那些参数呢?
我看了一下 是没有给分析过程,所以可能不太清楚参数。你需要分析过程吗?昨天在写提取教程,没来得及回复。
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
如果可以的话 最好给一份 … ------------------ 原始邮件 ------------------ 发件人: "Dustyposa"[email protected]; 发送时间: 2019年4月15日(星期一) 中午1:26 收件人: "CriseLYJ/awesome-python-login-model"[email protected]; 抄送: "upperone"[email protected]; "Author"[email protected]; 主题: Re: [CriseLYJ/awesome-python-login-model] 求解惑 (#52) 请问大佬 appid怎么取到的? 怎么知道访问这个地址需要传入那些参数呢? 我看了一下 是没有给分析过程,所以可能不太清楚参数。你需要分析过程吗?昨天在写提取教程,没来得及回复。 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
好的。
如果可以的话 最好给一份 … ------------------ 原始邮件 ------------------ 发件人: "Dustyposa"[email protected]; 发送时间: 2019年4月15日(星期一) 中午1:26 收件人: "CriseLYJ/awesome-python-login-model"[email protected]; 抄送: "upperone"[email protected]; "Author"[email protected]; 主题: Re: [CriseLYJ/awesome-python-login-model] 求解惑 (#52) 请问大佬 appid怎么取到的? 怎么知道访问这个地址需要传入那些参数呢? 我看了一下 是没有给分析过程,所以可能不太清楚参数。你需要分析过程吗?昨天在写提取教程,没来得及回复。 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread. 你看一下有没有解决你的问题呢? https://github.com/Dustyposa/goSpider/tree/master/spider_project/login/wx_web
如果可以的话 最好给一份 … ------------------ 原始邮件 ------------------ 发件人: "Dustyposa"[email protected]; 发送时间: 2019年4月15日(星期一) 中午1:26 收件人: "CriseLYJ/awesome-python-login-model"[email protected]; 抄送: "upperone"[email protected]; "Author"[email protected]; 主题: Re: [CriseLYJ/awesome-python-login-model] 求解惑 (#52) 请问大佬 appid怎么取到的? 怎么知道访问这个地址需要传入那些参数呢? 我看了一下 是没有给分析过程,所以可能不太清楚参数。你需要分析过程吗?昨天在写提取教程,没来得及回复。 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread. 你看一下有没有解决你的问题呢? https://github.com/Dustyposa/goSpider/tree/master/spider_project/login/wx_web
问题已解决,非常感谢,这个开发思路对我这种半吊子水平的初学者来说非常宝贵,就像前方的一盏明灯,再次谢谢
@shenxianxgg Ok 能解决你的问题你ok