We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
def fetch_payload_v(self): headers = { 'referer': 'https://www.ingress.com/intel', 'user-agent': 'balabalabala', } request = requests.post('https://www.ingress.com/jsc/gen_dashboard.js', headers=headers, verify=False) offset = request.text.index('b.v="') + 5 v = request.text[offset:offset + 40] return v
就像这样……
最开始运行的时候调用一次,等js版本更新之后v值改变的时候会返回{'error':'out of date'},这个时候重新调用一次就好了。
The text was updated successfully, but these errors were encountered:
看起来还是正则匹配‘[\da-f]{40}’比较安全……
Sorry, something went wrong.
Can you send a Pull Request for this? (Please follow PEP8). Thanks. I'm AFK these days
url = 'http://www.ingress.com/jsc/gen_dashboard.js' http = urllib3.PoolManager() response = http.request('GET', 'http://www.ingress.com/jsc/gen_dashboard.js') body = response.data a = re.search(r'c.v="(.*)";e=ud.g', body) version = a.group(1)
No branches or pull requests
就像这样……
最开始运行的时候调用一次,等js版本更新之后v值改变的时候会返回{'error':'out of date'},这个时候重新调用一次就好了。
The text was updated successfully, but these errors were encountered: