Commit 011a8fe2 011a8fe2f816f5c8290967575216fc74e272220f by wenxin

注释修改

1 parent 50c996ca
...@@ -19,7 +19,7 @@ class SpiderModel(Model): ...@@ -19,7 +19,7 @@ class SpiderModel(Model):
19 targetType = fields.IntEnumField( 19 targetType = fields.IntEnumField(
20 TypeEnum, description="数据类型", source_field="target_type" 20 TypeEnum, description="数据类型", source_field="target_type"
21 ) 21 )
22 platform = fields.CharField(max_length=255, description="平台名字") 22 platform = fields.CharField(max_length=255, description="平台名字 ALL TENCENT IQIYI YOUKU")
23 sourceName = fields.CharField( 23 sourceName = fields.CharField(
24 max_length=255, description="媒体资源名字", source_field="source_name" 24 max_length=255, description="媒体资源名字", source_field="source_name"
25 ) 25 )
......
...@@ -7,10 +7,13 @@ from pydantic import BaseModel, Field ...@@ -7,10 +7,13 @@ from pydantic import BaseModel, Field
7 7
8 8
9 class TypeEnum(IntEnum): 9 class TypeEnum(IntEnum):
10 EPISODES = 1 # 剧集 10 """
11 数据类型 1 电视剧 2 电影 3 综艺 4 动漫
12 """
13 EPISODES = 1 # 电视剧
11 MOVIE = 2 # 电影 14 MOVIE = 2 # 电影
12 ANIME = 3 # 动漫 15 ANIME = 4 # 动漫
13 VARIETY = 4 # 综艺 16 VARIETY = 3 # 综艺
14 17
15 def get_precise_positioning(self, other) -> List[str]: 18 def get_precise_positioning(self, other) -> List[str]:
16 if self.ANIME == other: 19 if self.ANIME == other:
......
...@@ -112,7 +112,7 @@ async def get_data( ...@@ -112,7 +112,7 @@ async def get_data(
112 time=target_time, 112 time=target_time,
113 targetType=TypeEnum(scrawl_type), 113 targetType=TypeEnum(scrawl_type),
114 createTime=datetime.now(), 114 createTime=datetime.now(),
115 platform="all", 115 platform="ALL",
116 score=float(x.split(" ")[-1]), 116 score=float(x.split(" ")[-1]),
117 sourceName=x.split(" ")[5], 117 sourceName=x.split(" ")[5],
118 ) 118 )
......