diff --git a/README.md b/README.md index 5beb501..c75a8c4 100644 --- a/README.md +++ b/README.md @@ -5,4 +5,30 @@ _________________________ 2022.6.1白雪公组发布了安装包版本的程序 (安装包内置了所有需要用的python库,无需使用任何软件打开喔) 链接:https://pan.baidu.com/s/1GsrlLqSfbi5d3WM8D-duYA -提取码:bxgz \ No newline at end of file +提取码:bxgz +url="https://so.gushiwen.org/gushi/tangshi.aspx" +r = requests.get(url) +r.encoding = 'utf-8' +soup=BeautifulSoup(r.text,'html.parser') +bg=soup.find("div",class_='sons') +lb=[] +body = soup.find_all("div",class_="typecont") +for i in body: + juanci = i.text.split()[1::] + leix = i.find("div",class_="bookMl").text + for i in juanci: + try: + li=i.split('(') + ci = li[0] + zz = li[1][:-1] + lb.append([leix,ci,zz]) + except: + pass +lb2=[] +for i in lb: + if i[2] == '白居易': + lb2.append(i) +for i in lb: + if i[2] == '李白': + lb2.append(i) +tsmc=lb2 \ No newline at end of file