J
J
Jungles2020-08-07 12:06:02
Python
Jungles, 2020-08-07 12:06:02

Cheat views on a question?

Light question.

I thought, is it possible to wind up the views on the question.
As far as I understand, after the transfer-opening of the link to the question - the counter increases by 1.
well, I wrote this

import requests
url = 'https://qna.habr.com/q/824293'
responce = requests.get(url)

Well, as you can see, nothing worked.
The counter increased only when I myself opened the page.
Why?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Tikhonov, 2020-08-07
@tumbler

Because views are registered with JS.

S
SKEPTIC, 2020-08-07
@pro100chel

See the Newtork tab when you open a question. Subsection XHR.
A POST request to https://qna.habr.com/question/ivc with the question_id parameter registers a view.
I also want to draw your attention to the fact that this website protects QRATOR. So be careful.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question