From 9a654c31699effc931470ba8de115cd707489cc5 Mon Sep 17 00:00:00 2001 From: 2509165045 <2509165045@student.edu.cn> Date: Tue, 23 Jun 2026 12:17:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=9F=E6=9C=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- q2_1_crawler/movie.json | 102 ++++++++++++++++++++++++++ q2_1_crawler/movies.html | 152 +++++++++++++++++++++++++++++++++++++++ q2_1_crawler/q2_1.py | 42 +++++++++++ q2_1_crawler/q2_2.py | 42 +++++++++++ 4 files changed, 338 insertions(+) create mode 100644 q2_1_crawler/movie.json create mode 100644 q2_1_crawler/movies.html create mode 100644 q2_1_crawler/q2_1.py create mode 100644 q2_1_crawler/q2_2.py diff --git a/q2_1_crawler/movie.json b/q2_1_crawler/movie.json new file mode 100644 index 0000000..fdce86a --- /dev/null +++ b/q2_1_crawler/movie.json @@ -0,0 +1,102 @@ +[ + { + "id": 1, + "title": "三傻大闹宝莱坞", + "director": "Frank Darabont", + "year": 2018, + "rating": 7.0, + "duration": 118, + "genre": "动画", + "actors_count": 5 + }, + { + "id": 2, + "title": "霸王别姬", + "director": "陈凯歌", + "year": 2012, + "rating": 7.1, + "duration": 119, + "genre": "爱情", + "actors_count": 4 + }, + { + "id": 3, + "title": "星际穿越", + "director": "Robert Zemeckis", + "year": 2015, + "rating": 8.8, + "duration": 171, + "genre": "冒险", + "actors_count": 3 + }, + { + "id": 4, + "title": "肖申克的救赎", + "director": "James Cameron", + "year": 2017, + "rating": 8.2, + "duration": 149, + "genre": "剧情", + "actors_count": 3 + }, + { + "id": 5, + "title": "阿甘正传", + "director": "宫崎骏", + "year": 2001, + "rating": 7.1, + "duration": 163, + "genre": "悬疑", + "actors_count": 3 + }, + { + "id": 6, + "title": "泰坦尼克号", + "director": "Christopher Nolan", + "year": 1996, + "rating": 8.6, + "duration": 171, + "genre": "冒险", + "actors_count": 5 + }, + { + "id": 7, + "title": "放牛班的春天", + "director": "Lasse Hallström", + "year": 2010, + "rating": 7.8, + "duration": 126, + "genre": "科幻", + "actors_count": 2 + }, + { + "id": 8, + "title": "千与千寻", + "director": "Rajkumar Hirani", + "year": 2002, + "rating": 8.6, + "duration": 160, + "genre": "悬疑", + "actors_count": 5 + }, + { + "id": 9, + "title": "忠犬八公的故事", + "director": "Christophe Barratier", + "year": 1997, + "rating": 7.9, + "duration": 138, + "genre": "冒险", + "actors_count": 5 + }, + { + "id": 10, + "title": "盗梦空间", + "director": "Christopher Nolan", + "year": 2008, + "rating": 7.3, + "duration": 158, + "genre": "爱情", + "actors_count": 5 + } +] \ No newline at end of file diff --git a/q2_1_crawler/movies.html b/q2_1_crawler/movies.html new file mode 100644 index 0000000..513eae1 --- /dev/null +++ b/q2_1_crawler/movies.html @@ -0,0 +1,152 @@ + + + + + +
+ +| 编号 | +电影名 | +导演 | +上映年份 | +评分 | +时长(分钟) | +类型 | +主演数 | +
|---|---|---|---|---|---|---|---|
| 1 | +三傻大闹宝莱坞 | +Frank Darabont | +2018 | +7.0 | +118 | +动画 | +5 | +
| 2 | +霸王别姬 | +陈凯歌 | +2012 | +7.1 | +119 | +爱情 | +4 | +
| 3 | +星际穿越 | +Robert Zemeckis | +2015 | +8.8 | +171 | +冒险 | +3 | +
| 4 | +肖申克的救赎 | +James Cameron | +2017 | +8.2 | +149 | +剧情 | +3 | +
| 5 | +阿甘正传 | +宫崎骏 | +2001 | +7.1 | +163 | +悬疑 | +3 | +
| 6 | +泰坦尼克号 | +Christopher Nolan | +1996 | +8.6 | +171 | +冒险 | +5 | +
| 7 | +放牛班的春天 | +Lasse Hallström | +2010 | +7.8 | +126 | +科幻 | +2 | +
| 8 | +千与千寻 | +Rajkumar Hirani | +2002 | +8.6 | +160 | +悬疑 | +5 | +
| 9 | +忠犬八公的故事 | +Christophe Barratier | +1997 | +7.9 | +138 | +冒险 | +5 | +
| 10 | +盗梦空间 | +Christopher Nolan | +2008 | +7.3 | +158 | +爱情 | +5 | +