R
R
rusyska550112020-11-10 18:50:20
Python
rusyska55011, 2020-11-10 18:50:20

What kind of cipher is issued during parsing?

Hello.
They get the CitiLink website page, write it to a file, run it through bs4. Gives nothing. I get into the file with the page code, and there is an incomprehensible cipher:
5faab565b3daa376326492.png

I also have another page of the site downloaded already, where everything is fine. However, a similar situation has already arisen, and only after a couple of repeated requests did I get a normal code.
5faab4e0c6110566970246.png

What is it? Why is this happening, and how to get a normal page the first time?

If anything, here is the class responsible for writing and reading files:

class Html_pages:
    def write(directory, file_name, url, html):  # принимает директорию куда сохранять, имя файла, ссылку страницы, код
        file = open('./Database/Pages/' + directory + '/' + file_name + '.txt',  'w', encoding='utf-8')

        file.write(url + '\n')
        file.write(str(html))

        file.close()

    def get(directory, file_name):
        file = io.open('./Database/Pages/' + directory + '/' + file_name + '.txt', 'r', encoding='utf-8')

        html = ''
        for line in file:
            html += line

        file.close()
        return html

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2020-11-10
@dimonchik2013

The Da Vinci Code

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question