N
N
nikitapremium2020-06-26 07:45:52
Python
nikitapremium, 2020-06-26 07:45:52

Explain in accessible language. Why is it that a simple get request to a file by a link and outputting .text displays html, while get(url.strip()) returns the contents of the file?

Python Explain in plain language. Why is it that a simple get request to a file using a link and outputting .text outputs html, while get(url.strip()) and outputting the same .txt file contents?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2020-06-26
@nikitapremium

obviously different urls are obtained - that's the server's response is different. I think in the first case it displays the standard html for 404, since the url is not correct.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question