Answer the question
In order to leave comments, you need to log in
In the browser, the response from the resource is one, in the script - another. Why?
I make a request through the browser, copy the url: https://processing.ruscorpora.ru/search.xml?env=al... I
parse it into tags
params = {}
for tag in full_url.split('&'):
key, val = tag.split('=')
params[key] = val
res = requests.get(url, params=params)
Answer the question
In order to leave comments, you need to log in
In general, everything works for me.
However, it is strange to see a request passing parameters via params .
Well, the first parameter is separated from the url not by an ampersand, but by a question mark.
Print params, you will see what is there
{'https://processing.ruscorpora.ru/search.xml?env': 'alpha', 'api': '1.0', 'mode': 'main', 'sort': 'i_grtagging', 'lang': 'ru', 'nodia': '1', 'text': 'lexgramm', 'lex1': '%D0%BA%D0%BE%D1%80%D0%BF%D1%83%D1%81', 'gramm1': 'acc%2C+sg'}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question