Проблема с запуском парсера

Traceback (most recent call last):
File “C:\Users\Макс\Desktop\Parcer.py”, line 28, in
File “C:\Users\Макс\Desktop\Parcer.py”, line 11, in parse
responce = requests.get(URL , headers=“HEADERS”)
File “C:\Users\Макс\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\api.py”, line 75, in get
return request(‘get’, url, params=params, **kwargs)
File “C:\Users\Макс\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\api.py”, line 61, in request
return session.request(method=method, url=url, **kwargs)
File “C:\Users\Макс\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\sessions.py”, line 528, in request
prep = self.prepare_request(req)
File “C:\Users\Макс\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\sessions.py”, line 456, in prepare_request
File “C:\Users\Макс\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\models.py”, line 317, in prepare
File “C:\Users\Макс\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\models.py”, line 449, in prepare_headers
for header in headers.items():
AttributeError: ‘str’ object has no attribute ‘items’


Please post your questions in English; we’ll be glad to help :slight_smile: Also, it is very helpful if you copy and paste in the code you are having problems with, in order to provide som context to the traceback. You can use triple backticks to format your code, like this:

# paste your code here

See also: