![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python基础
文章平均质量分 59
XRLoft
这个作者很懒,什么都没留下…
展开
-
[Python基础]在控制台打印某年的日历
直接上代码# encoding:utf-8from datetime import datetimedef is_leap_year(year): """ 根据年份判断是否为闰年 :param year: 年份 :return: 是否为闰年 """ return year % 4 == 0 and year % 100 != 0 or year % 400 == 0def get_days_month(year, month): """原创 2021-01-21 14:36:45 · 219 阅读 · 0 评论 -
[爬虫基础]爬取豆瓣电影Top250
目录1.安装必要的包2.上代码3.上图使用BeautifulSoup4爬取豆瓣电影Top250的图片保存到本地。1.安装必要的包pip install bs4pip install requests2.上代码# --coding:utf-8--import osimport requestsfrom bs4 import BeautifulSoupfrom urllib.request import urlretrievefrom concurrent.futures import原创 2021-01-16 14:24:46 · 485 阅读 · 0 评论