#!/usr/bin/env python
# -*- coding:UTF-8 -*-
import requests
from bs4 import BeautifulSoup
res=requests.get("https://www.cnblogs.com/NiceTime/")
# c=res.content
c=res.text
# print(c)
#获取文章日期
soup=BeautifulSoup(c,"html.parser")
postday=soup.find_all(class_="dayTitle")
# for i in postday:
# pday=i
# print(pday.a.string)
#获取文章标题
posttitle=soup.find_all(class_="postTitle")
# for i in posttitle:
# ptitle=i
# print(ptitle.a.string)
#获取文章摘要
postcorn=soup.find_all(class_="c_b_p_desc")
# for i in postcorn:
# ptitle=i
# print(pcorn.contents[0])
for day,title,corn in zip(postday,posttitle,postcorn):
# pcorn=i
print(day.a.string)
print(title.a.string)
print(corn.contents[0].string)
print("")