且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Python网站登录和xpath

更新时间:2023-12-05 14:21:46

首先,尝试下面的代码,看看它是否成功且没有错误.
然后您就可以开始处理有效载荷了.

First, try the below code, and see if it succeed without errors.
Then you could start processing the payload.

#!/usr/bin/env python

from __future__ import print_function
from pprint import pprint
import requests
from sys import exit

user = 'ABC'
pw = 'ABC'

r = requests.get('https://123.com/', auth=('user', 'pw'))
r = requests.get(URL)

if r.status_code != 200:
    exit(r.status_code)

exit(r.status_code)