Home > other >  Pycharm Run output window is not a Chinese, are hexadecimal
Pycharm Run output window is not a Chinese, are hexadecimal

Time:09-20

# - * - coding: utf-8 - * -
#


The import requests

The from bs4 import BeautifulSoup

Res=requests. Get (' http://opinion.people.com.cn/GB/8213/353915/353916/index.html ')
Res. The encoding="utf-8"
HTML=res. Text
Soup=BeautifulSoup (HTML, '. The HTML parser)

The items=soup. Find_all (class_='t11')

Print (items)


The code above,
, preliminary study creeper crawled in people's editorial information, but the initial output to Chinese are hexadecimal, according to the baidu search to install good no use, according to the website set up so that it is no use

Output interface are hexadecimal number, could you tell me what to do, really can't think of a way, the code encoding="utf-8" no use


  • Related