discogs_aio_spider
discogs_aio_spider copied to clipboard
我在使用Httpx的过程中遇到问题
I keep getting this error when I try to construct the request, and after checking the official documentation, it said it's a missing necessary header, but I can debug it successfully using the browser.
What could be causing this error?
`import httpx
def getMatch(): header = { 'user-agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36 Edg/99.0.1150.39' } client = httpx.Client(headers=header, http2=True, verify='riotgames.pem') url = 'some_url' request = httpx.Request("GET", url=url) r = client.send(request) print(r)
getMatch()`
httpx.LocalProtocolError: cannot receive data before headers