parent
4a54dd038b
commit
3dfc9aebb6
@ -0,0 +1,19 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
"""
|
||||||
|
Created on Thu Dec 19 21:58:29 2024
|
||||||
|
|
||||||
|
@author: LENOVO
|
||||||
|
"""
|
||||||
|
import requests
|
||||||
|
import pandas as pd
|
||||||
|
import matplotlib.pyplot as plt
|
||||||
|
import re
|
||||||
|
plt.rcParams['font.sans-serif'] = ["SimHei"]
|
||||||
|
|
||||||
|
url="https://top.chinaz.com/gongsi/index_zhuce.html"
|
||||||
|
res=requests.get(url)
|
||||||
|
t=res.text
|
||||||
|
name=re.findall('<h3 class=""><a href=.+? target="_blank">(.+?)</a></h3>',t)
|
||||||
|
money=re.findall('<div class="CoDate"><em>(.+?)</em>注册资本</div>',t)
|
||||||
|
plt.bar(name[:21],money[:21][::-1])
|
||||||
|
plt.show()
|
Loading…
Reference in new issue