spulec/uncurl

ipython uncurl error

Opened this issue · 0 comments

QGB commented
In [364]: _352
Out[364]: 'curl \'https://www.xxxxx.co/girl/?p=1\' \\\r\n  -H \'authority: www.xxxxxx.co\' \\\r\n  -H \'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9\' \\\r\n  -H \'accept-language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6,ru;q=0.5,ja;q=0.4,zh-TW;q=0.3,it;q=0.2,de;q=0.1\' \\\r\n  -H \'cookie: __51vcke__JNmlfXHHIrHMZgLq=fa5cf0f7-5ae2-5737-87d1-0d695a4a07fe; __51vuft__JNmlfXHHIrHMZgLq=1682497044373; gcha_sf=1684570941; __51uvsct__JNmlfXHHIrHMZgLq=2; jpx=18; __vtins__JNmlfXHHIrHMZgLq=%7B%22sid%22%3A%20%2264bb2c35-db8b-5451-943e-abf35a81d9b8%22%2C%20%22vd%22%3A%2016%2C%20%22stt%22%3A%20291193%2C%20%22dr%22%3A%206024%2C%20%22expires%22%3A%201684573034394%2C%20%22ct%22%3A%201684571234394%7D\' \\\r\n  -H \'sec-ch-ua: "Not?A_Brand";v="8", "Chromium";v="108", "Microsoft Edge";v="108"\' \\\r\n  -H \'sec-ch-ua-mobile: ?0\' \\\r\n  -H \'sec-ch-ua-platform: "Windows"\' \\\r\n  -H \'sec-fetch-dest: document\' \\\r\n  -H \'sec-fetch-mode: navigate\' \\\r\n  -H \'sec-fetch-site: none\' \\\r\n  -H \'sec-fetch-user: ?1\' \\\r\n  -H \'upgrade-insecure-requests: 1\' \\\r\n  -H \'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 Edg/108.0.1462.54\' \\\r\n  --compressed'

In [365]: import uncurl
     ...:
     ...: print(uncurl.parse(_352))
usage: ipython [-h] [-d DATA] [-b DATA_BINARY] [-X X] [-H HEADER]
               [--compressed] [-k] [--user USER] [-i] [-s]
               command url
 python: error: unrecognized arguments:
An exception has occurred, use %tb to see the full traceback.

SystemExit: 2

C:\QGB\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py:3334: UserWarning: To exit: use 'exit', 'quit', or Ctrl-D.
  warn("To exit: use 'exit', 'quit', or Ctrl-D.", stacklevel=1)