diff --git a/q2_1_crawler/movies.html b/q2_1_crawler/movies.html
new file mode 100644
index 0000000..9a8e5b7
--- /dev/null
+++ b/q2_1_crawler/movies.html
@@ -0,0 +1,152 @@
+
+
+
+
+
+
+
+ 电影列表
+
+
+
+ 电影列表
+ 数据编号:B-20260623-2074
+
+
+
+
+ | 编号 |
+ 电影名 |
+ 导演 |
+ 上映年份 |
+ 评分 |
+ 时长(分钟) |
+ 类型 |
+ 主演数 |
+
+
+
+
+
+ | 1 |
+ 放牛班的春天 |
+ Frank Darabont |
+ 2019 |
+ 8.2 |
+ 134 |
+ 爱情 |
+ 2 |
+
+
+
+ | 2 |
+ 忠犬八公的故事 |
+ 陈凯歌 |
+ 2010 |
+ 6.7 |
+ 130 |
+ 爱情 |
+ 4 |
+
+
+
+ | 3 |
+ 星际穿越 |
+ Robert Zemeckis |
+ 2010 |
+ 7.7 |
+ 109 |
+ 动画 |
+ 2 |
+
+
+
+ | 4 |
+ 阿甘正传 |
+ James Cameron |
+ 2005 |
+ 9.2 |
+ 98 |
+ 爱情 |
+ 4 |
+
+
+
+ | 5 |
+ 肖申克的救赎 |
+ 宫崎骏 |
+ 2022 |
+ 8.9 |
+ 111 |
+ 冒险 |
+ 4 |
+
+
+
+ | 6 |
+ 霸王别姬 |
+ Christopher Nolan |
+ 2005 |
+ 9.4 |
+ 169 |
+ 悬疑 |
+ 5 |
+
+
+
+ | 7 |
+ 千与千寻 |
+ Lasse Hallström |
+ 2000 |
+ 9.2 |
+ 106 |
+ 冒险 |
+ 4 |
+
+
+
+ | 8 |
+ 盗梦空间 |
+ Rajkumar Hirani |
+ 2014 |
+ 8.0 |
+ 101 |
+ 悬疑 |
+ 2 |
+
+
+
+ | 9 |
+ 泰坦尼克号 |
+ Christophe Barratier |
+ 1996 |
+ 9.2 |
+ 93 |
+ 喜剧 |
+ 5 |
+
+
+
+ | 10 |
+ 三傻大闹宝莱坞 |
+ Christopher Nolan |
+ 2003 |
+ 7.9 |
+ 114 |
+ 冒险 |
+ 4 |
+
+
+
+
+
+
\ No newline at end of file
diff --git a/q2_1_crawler/movies.json b/q2_1_crawler/movies.json
new file mode 100644
index 0000000..75f763f
--- /dev/null
+++ b/q2_1_crawler/movies.json
@@ -0,0 +1,102 @@
+[
+ {
+ "id": "1",
+ "title": "放牛班的春天",
+ "director": "Frank Darabont",
+ "year": 2019,
+ "rating": 8.2,
+ "duration": 134,
+ "genre": "爱情",
+ "actors_count": 2
+ },
+ {
+ "id": "2",
+ "title": "忠犬八公的故事",
+ "director": "陈凯歌",
+ "year": 2010,
+ "rating": 6.7,
+ "duration": 130,
+ "genre": "爱情",
+ "actors_count": 4
+ },
+ {
+ "id": "3",
+ "title": "星际穿越",
+ "director": "Robert Zemeckis",
+ "year": 2010,
+ "rating": 7.7,
+ "duration": 109,
+ "genre": "动画",
+ "actors_count": 2
+ },
+ {
+ "id": "4",
+ "title": "阿甘正传",
+ "director": "James Cameron",
+ "year": 2005,
+ "rating": 9.2,
+ "duration": 98,
+ "genre": "爱情",
+ "actors_count": 4
+ },
+ {
+ "id": "5",
+ "title": "肖申克的救赎",
+ "director": "宫崎骏",
+ "year": 2022,
+ "rating": 8.9,
+ "duration": 111,
+ "genre": "冒险",
+ "actors_count": 4
+ },
+ {
+ "id": "6",
+ "title": "霸王别姬",
+ "director": "Christopher Nolan",
+ "year": 2005,
+ "rating": 9.4,
+ "duration": 169,
+ "genre": "悬疑",
+ "actors_count": 5
+ },
+ {
+ "id": "7",
+ "title": "千与千寻",
+ "director": "Lasse Hallström",
+ "year": 2000,
+ "rating": 9.2,
+ "duration": 106,
+ "genre": "冒险",
+ "actors_count": 4
+ },
+ {
+ "id": "8",
+ "title": "盗梦空间",
+ "director": "Rajkumar Hirani",
+ "year": 2014,
+ "rating": 8.0,
+ "duration": 101,
+ "genre": "悬疑",
+ "actors_count": 2
+ },
+ {
+ "id": "9",
+ "title": "泰坦尼克号",
+ "director": "Christophe Barratier",
+ "year": 1996,
+ "rating": 9.2,
+ "duration": 93,
+ "genre": "喜剧",
+ "actors_count": 5
+ },
+ {
+ "id": "10",
+ "title": "三傻大闹宝莱坞",
+ "director": "Christopher Nolan",
+ "year": 2003,
+ "rating": 7.9,
+ "duration": 114,
+ "genre": "冒险",
+ "actors_count": 4
+ }
+]
\ No newline at end of file
diff --git a/q2_1_crawler/q2_1.py b/q2_1_crawler/q2_1.py
new file mode 100644
index 0000000..03aea6b
--- /dev/null
+++ b/q2_1_crawler/q2_1.py
@@ -0,0 +1,31 @@
+import re
+import requests
+from bs4 import BeautifulSoup as bs
+import json
+
+header = {'User-Agent':'Mozilla/5.0'}
+url = 'https://exam.detr.top/exam-b/movies'
+
+html = requests.get(url, headers=header).text
+# print(html)
+open('movies.html','w',encoding='utf-8').write(html)
+print(html)
+
+print("============")
+fd = bs(html, 'html.parser').find('p', class_='meta')
+fd = re.search(r'exam_fingerprint:\s*(\S+)', html).group(1)
+print(fd)
+
+resp = bs(html, 'html.parser').find_all('tr', class_='item-row')
+# print(resp)
+movies = []
+
+for i in resp:
+ c = []
+ for r in i.find_all('td'):
+ c.append(r.text.strip())
+ movies.append({
+ 'id':int(c[0]), 'title':c[1], 'director':c[2], 'year':int(c[3]), 'rating':float(c[4]), 'duration':int(c[5]), 'genre':c[6], 'actors_count':int(c[7])
+ })
+
+json.dump({"ID":fd, 'movies':movies}, open('movies.json', 'w', encoding='utf-8'), ensure_ascii=False, indent=2)
\ No newline at end of file
diff --git a/q2_1_crawler/q2_2.py b/q2_1_crawler/q2_2.py
new file mode 100644
index 0000000..97ec1c0
--- /dev/null
+++ b/q2_1_crawler/q2_2.py
@@ -0,0 +1,37 @@
+import json
+
+with open('q2_1_crawler\movies.json', 'r', encoding='utf-8') as f:
+ movies = json.load(f)
+
+if movies:
+ sorted_by_rating = sorted(movies, key=lambda x: x['rating'])
+ lowest_movie = sorted_by_rating[0]
+ highest_movie = sorted_by_rating[-1]
+
+ print("2.1 最高评分电影:")
+ print(f"电影名: {highest_movie['title']}, 评分: {highest_movie['rating']}")
+ print("\n最低评分电影:")
+ print(f"电影名: {lowest_movie['title']}, 评分: {lowest_movie['rating']}")
+
+genre_counts = {}
+for movie in movies:
+ genre = movie['genre']
+ genre_counts[genre] = genre_counts.get(genre, 0) + 1
+
+print("\n2.2 各类型电影数量字典:")
+print(genre_counts)
+
+director_counts = {}
+for movie in movies:
+ director = movie['director']
+ director_counts[director] = director_counts.get(director, 0) + 1
+
+print("\n2.3 各导演电影数量字典:")
+print(director_counts)
+
+count_2020_later = 0
+for movie in movies:
+ if movie['year'] >= 2020:
+ count_2020_later += 1
+
+print(f"\n2.4 2020年(含)以后上映的电影数量: {count_2020_later} 部")
\ No newline at end of file