标签:pytho .text strftime epo sele port soup 转换 class
#ReportingDate = soup.select(‘body > div.main > div > div.ctr > div.recruit > ul > li > a‘)[0].text.split(‘(‘)[-1].split(‘)‘)[0]
ReportingDate ="2015年11月20日"
array = time.strptime(ReportingDate, u"%Y年%m月%d日")
try:
ReportingDates = time.strftime("%Y-%m-%d", array)
except Exception as e:
print(e)
2019-03-18 Python time 将2015年11月20日转换为2015-11-20
标签:pytho .text strftime epo sele port soup 转换 class
原文地址:https://www.cnblogs.com/theDataDigger/p/10553782.html