https://www.shixiseng.com/intern/inn_ofn7ovjfqixq?pcm=pc_SearchLis
实习僧网站显示薪水如图
然而源代码中显示不出来,是因为自己并没有安装使用的字体,所以无法爬取
解决方法:自行编码
将这些框框复制到python用utf-8 decode一下
print('-/天'.encode('utf-8'))
#150-250/天
#输出16进制:每三个\***\***\***代表一位阿拉伯数字
#b'\xef\x81\x83\xee\xab\xbe\xee\xa4\x95-\xee\xb5\xb7\xee\xab\xbe\xee\xa4\x95/\xe5\xa4\xa9'
#0 \xee\xa4\x95
#1 \xef\x81\x83
#2 \xee\xb5\xb7
#5 \xee\xab\xbe
#天 \xe5\xa4\xa9
str='-/天'.encode('utf-8')
str=str.replace(b'\xee\xa4\x95',b'0')
str=str.replace(b'\xef\x81\x83',b'1')
str=str.replace(b'\xee\xb5\xb7',b'2')
str=str.replace(b'\xee\xab\xbe',b'5')
str=str.decode()
print(str)
可以正常显示啦,但反爬机制经常那个会变的,所以还要即使更新orz