Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
文鑫
/
guduo_spider
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
011a8fe2
...
011a8fe2f816f5c8290967575216fc74e272220f
authored
2024-12-23 13:36:07 +0800
by
wenxin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
注释修改
1 parent
50c996ca
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
app/model/mysql_model.py
app/schemas/spider_schema.py
app/spider/guduo_spider.py
app/model/mysql_model.py
View file @
011a8fe
...
...
@@ -19,7 +19,7 @@ class SpiderModel(Model):
targetType
=
fields
.
IntEnumField
(
TypeEnum
,
description
=
"数据类型"
,
source_field
=
"target_type"
)
platform
=
fields
.
CharField
(
max_length
=
255
,
description
=
"平台名字"
)
platform
=
fields
.
CharField
(
max_length
=
255
,
description
=
"平台名字
ALL TENCENT IQIYI YOUKU
"
)
sourceName
=
fields
.
CharField
(
max_length
=
255
,
description
=
"媒体资源名字"
,
source_field
=
"source_name"
)
...
...
app/schemas/spider_schema.py
View file @
011a8fe
...
...
@@ -7,10 +7,13 @@ from pydantic import BaseModel, Field
class
TypeEnum
(
IntEnum
):
EPISODES
=
1
# 剧集
"""
数据类型 1 电视剧 2 电影 3 综艺 4 动漫
"""
EPISODES
=
1
# 电视剧
MOVIE
=
2
# 电影
ANIME
=
3
# 动漫
VARIETY
=
4
# 综艺
ANIME
=
4
# 动漫
VARIETY
=
3
# 综艺
def
get_precise_positioning
(
self
,
other
)
->
List
[
str
]:
if
self
.
ANIME
==
other
:
...
...
app/spider/guduo_spider.py
View file @
011a8fe
...
...
@@ -112,7 +112,7 @@ async def get_data(
time
=
target_time
,
targetType
=
TypeEnum
(
scrawl_type
),
createTime
=
datetime
.
now
(),
platform
=
"
all
"
,
platform
=
"
ALL
"
,
score
=
float
(
x
.
split
(
" "
)[
-
1
]),
sourceName
=
x
.
split
(
" "
)[
5
],
)
...
...
Please
register
or
sign in
to post a comment