完成q3情感标注
This commit is contained in:
33038
get-pip.py
Normal file
33038
get-pip.py
Normal file
File diff suppressed because it is too large
Load Diff
186
movies.html
186
movies.html
@@ -1,5 +1,5 @@
|
||||
<!-- exam_fingerprint: B-20260623-9165 -->
|
||||
<!-- server_time: 2026-06-23 11:05:22 -->
|
||||
<!-- exam_fingerprint: B-20260705-9162 -->
|
||||
<!-- server_time: 2026-07-05 21:45:58 -->
|
||||
<!-- exam_paper: B -->
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
@@ -19,7 +19,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<h1>电影列表</h1>
|
||||
<p class="meta">数据编号:<code>B-20260623-9165</code></p>
|
||||
<p class="meta">数据编号:<code>B-20260705-9162</code></p>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
@@ -36,114 +36,114 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>肖申克的救赎</td>
|
||||
<td>Frank Darabont</td>
|
||||
<td>2006</td>
|
||||
<td>7.0</td>
|
||||
<td>110</td>
|
||||
<td>爱情</td>
|
||||
<td>5</td>
|
||||
<tr class="item-row">
|
||||
<td class="item-id">1</td>
|
||||
<td class="item-title">放牛班的春天</td>
|
||||
<td class="item-director">Frank Darabont</td>
|
||||
<td class="item-year">2007</td>
|
||||
<td class="item-rating">8.9</td>
|
||||
<td class="item-duration">155</td>
|
||||
<td class="item-genre">悬疑</td>
|
||||
<td class="item-actors-count">5</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>三傻大闹宝莱坞</td>
|
||||
<td>陈凯歌</td>
|
||||
<td>1997</td>
|
||||
<td>6.7</td>
|
||||
<td>102</td>
|
||||
<td>悬疑</td>
|
||||
<td>3</td>
|
||||
<tr class="item-row">
|
||||
<td class="item-id">2</td>
|
||||
<td class="item-title">霸王别姬</td>
|
||||
<td class="item-director">陈凯歌</td>
|
||||
<td class="item-year">2018</td>
|
||||
<td class="item-rating">6.6</td>
|
||||
<td class="item-duration">143</td>
|
||||
<td class="item-genre">剧情</td>
|
||||
<td class="item-actors-count">4</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>3</td>
|
||||
<td>千与千寻</td>
|
||||
<td>Robert Zemeckis</td>
|
||||
<td>1994</td>
|
||||
<td>6.9</td>
|
||||
<td>146</td>
|
||||
<td>动画</td>
|
||||
<td>5</td>
|
||||
<tr class="item-row">
|
||||
<td class="item-id">3</td>
|
||||
<td class="item-title">星际穿越</td>
|
||||
<td class="item-director">Robert Zemeckis</td>
|
||||
<td class="item-year">2018</td>
|
||||
<td class="item-rating">8.4</td>
|
||||
<td class="item-duration">165</td>
|
||||
<td class="item-genre">悬疑</td>
|
||||
<td class="item-actors-count">5</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>4</td>
|
||||
<td>放牛班的春天</td>
|
||||
<td>James Cameron</td>
|
||||
<td>2007</td>
|
||||
<td>7.3</td>
|
||||
<td>162</td>
|
||||
<td>悬疑</td>
|
||||
<td>3</td>
|
||||
<tr class="item-row">
|
||||
<td class="item-id">4</td>
|
||||
<td class="item-title">肖申克的救赎</td>
|
||||
<td class="item-director">James Cameron</td>
|
||||
<td class="item-year">2008</td>
|
||||
<td class="item-rating">8.6</td>
|
||||
<td class="item-duration">124</td>
|
||||
<td class="item-genre">剧情</td>
|
||||
<td class="item-actors-count">5</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>5</td>
|
||||
<td>泰坦尼克号</td>
|
||||
<td>宫崎骏</td>
|
||||
<td>1996</td>
|
||||
<td>6.2</td>
|
||||
<td>105</td>
|
||||
<td>悬疑</td>
|
||||
<td>4</td>
|
||||
<tr class="item-row">
|
||||
<td class="item-id">5</td>
|
||||
<td class="item-title">盗梦空间</td>
|
||||
<td class="item-director">宫崎骏</td>
|
||||
<td class="item-year">1993</td>
|
||||
<td class="item-rating">7.8</td>
|
||||
<td class="item-duration">90</td>
|
||||
<td class="item-genre">爱情</td>
|
||||
<td class="item-actors-count">2</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>6</td>
|
||||
<td>盗梦空间</td>
|
||||
<td>Christopher Nolan</td>
|
||||
<td>2024</td>
|
||||
<td>8.6</td>
|
||||
<td>166</td>
|
||||
<td>科幻</td>
|
||||
<td>4</td>
|
||||
<tr class="item-row">
|
||||
<td class="item-id">6</td>
|
||||
<td class="item-title">泰坦尼克号</td>
|
||||
<td class="item-director">Christopher Nolan</td>
|
||||
<td class="item-year">2001</td>
|
||||
<td class="item-rating">6.7</td>
|
||||
<td class="item-duration">175</td>
|
||||
<td class="item-genre">喜剧</td>
|
||||
<td class="item-actors-count">4</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>7</td>
|
||||
<td>星际穿越</td>
|
||||
<td>Lasse Hallström</td>
|
||||
<td>2018</td>
|
||||
<td>6.5</td>
|
||||
<td>152</td>
|
||||
<td>喜剧</td>
|
||||
<td>5</td>
|
||||
<tr class="item-row">
|
||||
<td class="item-id">7</td>
|
||||
<td class="item-title">忠犬八公的故事</td>
|
||||
<td class="item-director">Lasse Hallström</td>
|
||||
<td class="item-year">2004</td>
|
||||
<td class="item-rating">8.2</td>
|
||||
<td class="item-duration">91</td>
|
||||
<td class="item-genre">动画</td>
|
||||
<td class="item-actors-count">3</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>8</td>
|
||||
<td>阿甘正传</td>
|
||||
<td>Rajkumar Hirani</td>
|
||||
<td>2002</td>
|
||||
<td>8.9</td>
|
||||
<td>112</td>
|
||||
<td>剧情</td>
|
||||
<td>4</td>
|
||||
<tr class="item-row">
|
||||
<td class="item-id">8</td>
|
||||
<td class="item-title">三傻大闹宝莱坞</td>
|
||||
<td class="item-director">Rajkumar Hirani</td>
|
||||
<td class="item-year">2011</td>
|
||||
<td class="item-rating">6.3</td>
|
||||
<td class="item-duration">175</td>
|
||||
<td class="item-genre">冒险</td>
|
||||
<td class="item-actors-count">3</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>9</td>
|
||||
<td>霸王别姬</td>
|
||||
<td>Christophe Barratier</td>
|
||||
<td>2005</td>
|
||||
<td>9.3</td>
|
||||
<td>149</td>
|
||||
<td>悬疑</td>
|
||||
<td>2</td>
|
||||
<tr class="item-row">
|
||||
<td class="item-id">9</td>
|
||||
<td class="item-title">阿甘正传</td>
|
||||
<td class="item-director">Christophe Barratier</td>
|
||||
<td class="item-year">2022</td>
|
||||
<td class="item-rating">7.9</td>
|
||||
<td class="item-duration">107</td>
|
||||
<td class="item-genre">动画</td>
|
||||
<td class="item-actors-count">4</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>10</td>
|
||||
<td>忠犬八公的故事</td>
|
||||
<td>Christopher Nolan</td>
|
||||
<td>1996</td>
|
||||
<td>6.3</td>
|
||||
<td>128</td>
|
||||
<td>冒险</td>
|
||||
<td>4</td>
|
||||
<tr class="item-row">
|
||||
<td class="item-id">10</td>
|
||||
<td class="item-title">千与千寻</td>
|
||||
<td class="item-director">Christopher Nolan</td>
|
||||
<td class="item-year">1993</td>
|
||||
<td class="item-rating">7.2</td>
|
||||
<td class="item-duration">129</td>
|
||||
<td class="item-genre">悬疑</td>
|
||||
<td class="item-actors-count">3</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
|
||||
162
movies.json
162
movies.json
@@ -1,105 +1,105 @@
|
||||
{
|
||||
"data_code": "B-20260623-9165",
|
||||
"data_code": "B-20260705-9162",
|
||||
"movies": [
|
||||
{
|
||||
"id": 1,
|
||||
"title": "肖申克的救赎",
|
||||
"title": "放牛班的春天",
|
||||
"director": "Frank Darabont",
|
||||
"year": 2006,
|
||||
"rating": 7.0,
|
||||
"duration": 110,
|
||||
"genre": "爱情",
|
||||
"year": 2007,
|
||||
"rating": 8.9,
|
||||
"duration": 155,
|
||||
"genre": "悬疑",
|
||||
"actors_count": 5
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"title": "三傻大闹宝莱坞",
|
||||
"title": "霸王别姬",
|
||||
"director": "陈凯歌",
|
||||
"year": 1997,
|
||||
"rating": 6.7,
|
||||
"duration": 102,
|
||||
"genre": "悬疑",
|
||||
"actors_count": 3
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"title": "千与千寻",
|
||||
"director": "Robert Zemeckis",
|
||||
"year": 1994,
|
||||
"rating": 6.9,
|
||||
"duration": 146,
|
||||
"genre": "动画",
|
||||
"actors_count": 5
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"title": "放牛班的春天",
|
||||
"director": "James Cameron",
|
||||
"year": 2007,
|
||||
"rating": 7.3,
|
||||
"duration": 162,
|
||||
"genre": "悬疑",
|
||||
"actors_count": 3
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"title": "泰坦尼克号",
|
||||
"director": "宫崎骏",
|
||||
"year": 1996,
|
||||
"rating": 6.2,
|
||||
"duration": 105,
|
||||
"genre": "悬疑",
|
||||
"actors_count": 4
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"title": "盗梦空间",
|
||||
"director": "Christopher Nolan",
|
||||
"year": 2024,
|
||||
"rating": 8.6,
|
||||
"duration": 166,
|
||||
"genre": "科幻",
|
||||
"actors_count": 4
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"title": "星际穿越",
|
||||
"director": "Lasse Hallström",
|
||||
"year": 2018,
|
||||
"rating": 6.5,
|
||||
"duration": 152,
|
||||
"genre": "喜剧",
|
||||
"actors_count": 5
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"title": "阿甘正传",
|
||||
"director": "Rajkumar Hirani",
|
||||
"year": 2002,
|
||||
"rating": 8.9,
|
||||
"duration": 112,
|
||||
"rating": 6.6,
|
||||
"duration": 143,
|
||||
"genre": "剧情",
|
||||
"actors_count": 4
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"title": "霸王别姬",
|
||||
"director": "Christophe Barratier",
|
||||
"year": 2005,
|
||||
"rating": 9.3,
|
||||
"duration": 149,
|
||||
"id": 3,
|
||||
"title": "星际穿越",
|
||||
"director": "Robert Zemeckis",
|
||||
"year": 2018,
|
||||
"rating": 8.4,
|
||||
"duration": 165,
|
||||
"genre": "悬疑",
|
||||
"actors_count": 5
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"title": "肖申克的救赎",
|
||||
"director": "James Cameron",
|
||||
"year": 2008,
|
||||
"rating": 8.6,
|
||||
"duration": 124,
|
||||
"genre": "剧情",
|
||||
"actors_count": 5
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"title": "盗梦空间",
|
||||
"director": "宫崎骏",
|
||||
"year": 1993,
|
||||
"rating": 7.8,
|
||||
"duration": 90,
|
||||
"genre": "爱情",
|
||||
"actors_count": 2
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"title": "忠犬八公的故事",
|
||||
"id": 6,
|
||||
"title": "泰坦尼克号",
|
||||
"director": "Christopher Nolan",
|
||||
"year": 1996,
|
||||
"rating": 6.3,
|
||||
"duration": 128,
|
||||
"genre": "冒险",
|
||||
"year": 2001,
|
||||
"rating": 6.7,
|
||||
"duration": 175,
|
||||
"genre": "喜剧",
|
||||
"actors_count": 4
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"title": "忠犬八公的故事",
|
||||
"director": "Lasse Hallström",
|
||||
"year": 2004,
|
||||
"rating": 8.2,
|
||||
"duration": 91,
|
||||
"genre": "动画",
|
||||
"actors_count": 3
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"title": "三傻大闹宝莱坞",
|
||||
"director": "Rajkumar Hirani",
|
||||
"year": 2011,
|
||||
"rating": 6.3,
|
||||
"duration": 175,
|
||||
"genre": "冒险",
|
||||
"actors_count": 3
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"title": "阿甘正传",
|
||||
"director": "Christophe Barratier",
|
||||
"year": 2022,
|
||||
"rating": 7.9,
|
||||
"duration": 107,
|
||||
"genre": "动画",
|
||||
"actors_count": 4
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"title": "千与千寻",
|
||||
"director": "Christopher Nolan",
|
||||
"year": 1993,
|
||||
"rating": 7.2,
|
||||
"duration": 129,
|
||||
"genre": "悬疑",
|
||||
"actors_count": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
87
q2_1_crawler/movie.py
Normal file
87
q2_1_crawler/movie.py
Normal file
@@ -0,0 +1,87 @@
|
||||
import requests
|
||||
import json
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
url = "https://exam.detr.top/exam-b/movies"
|
||||
headers = {
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
|
||||
}
|
||||
|
||||
resp = requests.get(url, headers=headers)
|
||||
resp.encoding = resp.apparent_encoding
|
||||
html_source = resp.text
|
||||
|
||||
with open("movies.html", "w", encoding="utf-8") as f:
|
||||
f.write(html_source)
|
||||
print("已保存原始网页:movies.html")
|
||||
|
||||
soup = BeautifulSoup(html_source, "html.parser")
|
||||
|
||||
code_text = soup.find("code").get_text(strip=True)
|
||||
data_id = code_text.split(":")[-1].strip()
|
||||
|
||||
table_rows = soup.find("table").find_all("tr")[1:]
|
||||
movie_list = []
|
||||
|
||||
for row in table_rows:
|
||||
tds = row.find_all("td")
|
||||
movie_info = {
|
||||
"id": int(tds[0].text),
|
||||
"title": tds[1].text,
|
||||
"director": tds[2].text,
|
||||
"year": int(tds[3].text),
|
||||
"rating": float(tds[4].text),
|
||||
"duration": int(tds[5].text),
|
||||
"genre": tds[6].text,
|
||||
"actors_count": int(tds[7].text)
|
||||
}
|
||||
movie_list.append(movie_info)
|
||||
|
||||
# 组装json总数据
|
||||
json_data = {
|
||||
"data_code": data_id,
|
||||
"movies": movie_list
|
||||
}
|
||||
|
||||
# 保存movies.json
|
||||
with open("movies.json", "w", encoding="utf-8") as f:
|
||||
json.dump(json_data, f, ensure_ascii=False, indent=4)
|
||||
print("已保存电影数据:movies.json")
|
||||
|
||||
# ====================== 第2题:读取movies.json进行数据分析 ======================
|
||||
# 读取json文件
|
||||
with open("movies.json", "r", encoding="utf-8") as f:
|
||||
load_data = json.load(f)
|
||||
movies = load_data["movies"]
|
||||
|
||||
# ① 找出评分最高、最低电影
|
||||
sorted_by_rating = sorted(movies, key=lambda x: x["rating"])
|
||||
min_movie = sorted_by_rating[0]
|
||||
max_movie = sorted_by_rating[-1]
|
||||
print("\n===== ① 评分最高/最低电影 =====")
|
||||
print(f"评分最低:{min_movie['title']} {min_movie['rating']}")
|
||||
print(f"评分最高:{max_movie['title']} {max_movie['rating']}")
|
||||
|
||||
# ② 统计各类型电影数量
|
||||
genre_count = {}
|
||||
for m in movies:
|
||||
g = m["genre"]
|
||||
genre_count[g] = genre_count.get(g, 0) + 1
|
||||
print("\n===== ② 各类型电影数量 =====")
|
||||
print(genre_count)
|
||||
|
||||
# ③ 统计各导演电影数量
|
||||
director_count = {}
|
||||
for m in movies:
|
||||
d = m["director"]
|
||||
director_count[d] = director_count.get(d, 0) + 1
|
||||
print("\n===== ③ 各导演电影数量 =====")
|
||||
print(director_count)
|
||||
|
||||
# ④ 统计2020年(含)以后上映电影数量
|
||||
cnt_after_2020 = 0
|
||||
for m in movies:
|
||||
if m["year"] >= 2020:
|
||||
cnt_after_2020 += 1
|
||||
print("\n===== ④ 2020年(含)后上映电影总数 =====")
|
||||
print(cnt_after_2020)
|
||||
152
q2_1_crawler/movies.html
Normal file
152
q2_1_crawler/movies.html
Normal file
@@ -0,0 +1,152 @@
|
||||
<!-- exam_fingerprint: B-20260705-9162 -->
|
||||
<!-- server_time: 2026-07-05 21:45:58 -->
|
||||
<!-- exam_paper: B -->
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>电影列表</title>
|
||||
<style>
|
||||
body { font-family: "Microsoft YaHei", sans-serif; margin: 20px; background: #f5f5f5; }
|
||||
h1 { color: #c0392b; }
|
||||
.meta { color: #999; font-size: 12px; margin-bottom: 15px; }
|
||||
.meta code { background: #e9ecef; padding: 2px 6px; border-radius: 3px; }
|
||||
table { width: 100%; border-collapse: collapse; background: white; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
|
||||
th, td { padding: 10px; text-align: left; border-bottom: 1px solid #ddd; }
|
||||
th { background: #c0392b; color: white; }
|
||||
tr:hover { background: #fef5f4; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>电影列表</h1>
|
||||
<p class="meta">数据编号:<code>B-20260705-9162</code></p>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>编号</th>
|
||||
<th>电影名</th>
|
||||
<th>导演</th>
|
||||
<th>上映年份</th>
|
||||
<th>评分</th>
|
||||
<th>时长(分钟)</th>
|
||||
<th>类型</th>
|
||||
<th>主演数</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<tr class="item-row">
|
||||
<td class="item-id">1</td>
|
||||
<td class="item-title">放牛班的春天</td>
|
||||
<td class="item-director">Frank Darabont</td>
|
||||
<td class="item-year">2007</td>
|
||||
<td class="item-rating">8.9</td>
|
||||
<td class="item-duration">155</td>
|
||||
<td class="item-genre">悬疑</td>
|
||||
<td class="item-actors-count">5</td>
|
||||
</tr>
|
||||
|
||||
<tr class="item-row">
|
||||
<td class="item-id">2</td>
|
||||
<td class="item-title">霸王别姬</td>
|
||||
<td class="item-director">陈凯歌</td>
|
||||
<td class="item-year">2018</td>
|
||||
<td class="item-rating">6.6</td>
|
||||
<td class="item-duration">143</td>
|
||||
<td class="item-genre">剧情</td>
|
||||
<td class="item-actors-count">4</td>
|
||||
</tr>
|
||||
|
||||
<tr class="item-row">
|
||||
<td class="item-id">3</td>
|
||||
<td class="item-title">星际穿越</td>
|
||||
<td class="item-director">Robert Zemeckis</td>
|
||||
<td class="item-year">2018</td>
|
||||
<td class="item-rating">8.4</td>
|
||||
<td class="item-duration">165</td>
|
||||
<td class="item-genre">悬疑</td>
|
||||
<td class="item-actors-count">5</td>
|
||||
</tr>
|
||||
|
||||
<tr class="item-row">
|
||||
<td class="item-id">4</td>
|
||||
<td class="item-title">肖申克的救赎</td>
|
||||
<td class="item-director">James Cameron</td>
|
||||
<td class="item-year">2008</td>
|
||||
<td class="item-rating">8.6</td>
|
||||
<td class="item-duration">124</td>
|
||||
<td class="item-genre">剧情</td>
|
||||
<td class="item-actors-count">5</td>
|
||||
</tr>
|
||||
|
||||
<tr class="item-row">
|
||||
<td class="item-id">5</td>
|
||||
<td class="item-title">盗梦空间</td>
|
||||
<td class="item-director">宫崎骏</td>
|
||||
<td class="item-year">1993</td>
|
||||
<td class="item-rating">7.8</td>
|
||||
<td class="item-duration">90</td>
|
||||
<td class="item-genre">爱情</td>
|
||||
<td class="item-actors-count">2</td>
|
||||
</tr>
|
||||
|
||||
<tr class="item-row">
|
||||
<td class="item-id">6</td>
|
||||
<td class="item-title">泰坦尼克号</td>
|
||||
<td class="item-director">Christopher Nolan</td>
|
||||
<td class="item-year">2001</td>
|
||||
<td class="item-rating">6.7</td>
|
||||
<td class="item-duration">175</td>
|
||||
<td class="item-genre">喜剧</td>
|
||||
<td class="item-actors-count">4</td>
|
||||
</tr>
|
||||
|
||||
<tr class="item-row">
|
||||
<td class="item-id">7</td>
|
||||
<td class="item-title">忠犬八公的故事</td>
|
||||
<td class="item-director">Lasse Hallström</td>
|
||||
<td class="item-year">2004</td>
|
||||
<td class="item-rating">8.2</td>
|
||||
<td class="item-duration">91</td>
|
||||
<td class="item-genre">动画</td>
|
||||
<td class="item-actors-count">3</td>
|
||||
</tr>
|
||||
|
||||
<tr class="item-row">
|
||||
<td class="item-id">8</td>
|
||||
<td class="item-title">三傻大闹宝莱坞</td>
|
||||
<td class="item-director">Rajkumar Hirani</td>
|
||||
<td class="item-year">2011</td>
|
||||
<td class="item-rating">6.3</td>
|
||||
<td class="item-duration">175</td>
|
||||
<td class="item-genre">冒险</td>
|
||||
<td class="item-actors-count">3</td>
|
||||
</tr>
|
||||
|
||||
<tr class="item-row">
|
||||
<td class="item-id">9</td>
|
||||
<td class="item-title">阿甘正传</td>
|
||||
<td class="item-director">Christophe Barratier</td>
|
||||
<td class="item-year">2022</td>
|
||||
<td class="item-rating">7.9</td>
|
||||
<td class="item-duration">107</td>
|
||||
<td class="item-genre">动画</td>
|
||||
<td class="item-actors-count">4</td>
|
||||
</tr>
|
||||
|
||||
<tr class="item-row">
|
||||
<td class="item-id">10</td>
|
||||
<td class="item-title">千与千寻</td>
|
||||
<td class="item-director">Christopher Nolan</td>
|
||||
<td class="item-year">1993</td>
|
||||
<td class="item-rating">7.2</td>
|
||||
<td class="item-duration">129</td>
|
||||
<td class="item-genre">悬疑</td>
|
||||
<td class="item-actors-count">3</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
105
q2_1_crawler/movies.json
Normal file
105
q2_1_crawler/movies.json
Normal file
@@ -0,0 +1,105 @@
|
||||
{
|
||||
"data_code": "B-20260705-9162",
|
||||
"movies": [
|
||||
{
|
||||
"id": 1,
|
||||
"title": "放牛班的春天",
|
||||
"director": "Frank Darabont",
|
||||
"year": 2007,
|
||||
"rating": 8.9,
|
||||
"duration": 155,
|
||||
"genre": "悬疑",
|
||||
"actors_count": 5
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"title": "霸王别姬",
|
||||
"director": "陈凯歌",
|
||||
"year": 2018,
|
||||
"rating": 6.6,
|
||||
"duration": 143,
|
||||
"genre": "剧情",
|
||||
"actors_count": 4
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"title": "星际穿越",
|
||||
"director": "Robert Zemeckis",
|
||||
"year": 2018,
|
||||
"rating": 8.4,
|
||||
"duration": 165,
|
||||
"genre": "悬疑",
|
||||
"actors_count": 5
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"title": "肖申克的救赎",
|
||||
"director": "James Cameron",
|
||||
"year": 2008,
|
||||
"rating": 8.6,
|
||||
"duration": 124,
|
||||
"genre": "剧情",
|
||||
"actors_count": 5
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"title": "盗梦空间",
|
||||
"director": "宫崎骏",
|
||||
"year": 1993,
|
||||
"rating": 7.8,
|
||||
"duration": 90,
|
||||
"genre": "爱情",
|
||||
"actors_count": 2
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"title": "泰坦尼克号",
|
||||
"director": "Christopher Nolan",
|
||||
"year": 2001,
|
||||
"rating": 6.7,
|
||||
"duration": 175,
|
||||
"genre": "喜剧",
|
||||
"actors_count": 4
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"title": "忠犬八公的故事",
|
||||
"director": "Lasse Hallström",
|
||||
"year": 2004,
|
||||
"rating": 8.2,
|
||||
"duration": 91,
|
||||
"genre": "动画",
|
||||
"actors_count": 3
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"title": "三傻大闹宝莱坞",
|
||||
"director": "Rajkumar Hirani",
|
||||
"year": 2011,
|
||||
"rating": 6.3,
|
||||
"duration": 175,
|
||||
"genre": "冒险",
|
||||
"actors_count": 3
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"title": "阿甘正传",
|
||||
"director": "Christophe Barratier",
|
||||
"year": 2022,
|
||||
"rating": 7.9,
|
||||
"duration": 107,
|
||||
"genre": "动画",
|
||||
"actors_count": 4
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"title": "千与千寻",
|
||||
"director": "Christopher Nolan",
|
||||
"year": 1993,
|
||||
"rating": 7.2,
|
||||
"duration": 129,
|
||||
"genre": "悬疑",
|
||||
"actors_count": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
27
q2_1_crawler/q3_2_takeout_reviews.json
Normal file
27
q2_1_crawler/q3_2_takeout_reviews.json
Normal file
@@ -0,0 +1,27 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"text": "外卖小哥送得超快,餐盒还是热的,炸鸡酥脆多汁,酸辣粉也很正宗,分量足,五星好评!",
|
||||
"sentiment": "正面"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"text": "等了一个半小时才送到,汤全洒了,面坨成一坨,联系客服也不回,太让人失望了。",
|
||||
"sentiment": "负面"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"text": "奶茶是用料很扎实的现煮茶,珍珠Q弹有嚼劲,配送员态度也好,下次还会再点。",
|
||||
"sentiment": "正面"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"text": "配送速度一般,但披萨味道不错,芝士拉丝效果好,性价比高,值得推荐。",
|
||||
"sentiment": "正面"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"text": "点的麻辣烫食材不新鲜,有股怪味,吃完拉肚子,商家推卸责任,再也不点了。",
|
||||
"sentiment": "负面"
|
||||
}
|
||||
]
|
||||
27
q3/q3_2/q3_2_takeout_reviews.json
Normal file
27
q3/q3_2/q3_2_takeout_reviews.json
Normal file
@@ -0,0 +1,27 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"text": "外卖小哥送得超快,餐盒还是热的,炸鸡酥脆多汁,酸辣粉也很正宗,分量足,五星好评!",
|
||||
"sentiment": "正面"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"text": "等了一个半小时才送到,汤全洒了,面坨成一坨,联系客服也不回,太让人失望了。",
|
||||
"sentiment": "负面"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"text": "奶茶是用料很扎实的现煮茶,珍珠Q弹有嚼劲,配送员态度也好,下次还会再点。",
|
||||
"sentiment": "正面"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"text": "配送速度一般,但披萨味道不错,芝士拉丝效果好,性价比高,值得推荐。",
|
||||
"sentiment": "正面"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"text": "点的麻辣烫食材不新鲜,有股怪味,吃完拉肚子,商家推卸责任,再也不点了。",
|
||||
"sentiment": "负面"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user