1
1
1HAWK12022-01-14 14:21:26
Python
1HAWK1, 2022-01-14 14:21:26

Does the site page exist? (check) in Python. How to do?

Does the site page exist? (check) in Python. How to do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2022-01-14
@SoreMix

There is no universal answer. You need to determine your fingerprint of a non-existent page on the desired site.
Some sites will redirect to /404or conditional /notfound, or maybe to /. Someone may fall into a 5xx error, and someone will issue 404 page not found, while returning the status code 200. If there is no required access level, 401 may also fall out, the page exists, only there are no rights to access it, this is considered to exist for you ?
In general, existence can be determined in any way, by the size of the response, by the status code, by redirects, by the text per page, by the number of words per page, and so on and so forth. It all depends on your goals and site. Normal get to the desired page and there we already select one of the options above

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question