阅读背景:

python解析curl命令内容_aaronthon的博客

来源:互联网 

将curl解析次字典形式,代码如下:

# coding:utf-8
import argparse
import warnings
from shlex import split
from http.cookies import SimpleCookie
from urllib.parse import urlparse
from w3lib.http import basic_auth_header


class CurlParser(argparse.ArgumentParser):
    def error(self, message):
        error_msg = \
            'There was an error parsing the curl command: {}'.format(message)
        raise ValueError(error_msg)

# coding:utf-8
i



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: