Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
amazon_reports
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
common
amazon_reports
Commits
82a37d66
Commit
82a37d66
authored
Oct 16, 2024
by
邱阿朋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
爬虫处理
parent
8d5adcae
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
coop.py
coop.py
+8
-3
returns.py
returns.py
+7
-3
No files found.
coop.py
View file @
82a37d66
...
@@ -3,14 +3,19 @@
...
@@ -3,14 +3,19 @@
import
os
import
os
import
pandas
as
pd
import
pandas
as
pd
from
DrissionPage
import
ChromiumPage
from
DrissionPage
import
ChromiumPage
,
ChromiumOptions
from
DrissionPage.errors
import
PageDisconnectedError
from
DrissionPage.errors
import
PageDisconnectedError
from
helper
import
helper
from
helper
import
helper
page
=
ChromiumPage
()
# 创建配置对象(默认从 ini 文件中读取配置)
page
.
set
.
load_mode
.
normal
()
co
=
ChromiumOptions
()
# 设置不加载图片、静音
co
.
no_imgs
(
True
)
.
mute
(
True
)
page
=
ChromiumPage
(
addr_or_opts
=
co
)
page
.
set
.
load_mode
.
eager
()
page
.
set
.
when_download_file_exists
(
'overwrite'
)
page
.
set
.
when_download_file_exists
(
'overwrite'
)
# 下载目录
# 下载目录
download_path
=
os
.
getcwd
()
download_path
=
os
.
getcwd
()
# 检查下载目录是否存在,如果不存在则创建
# 检查下载目录是否存在,如果不存在则创建
...
...
returns.py
View file @
82a37d66
...
@@ -4,7 +4,7 @@ import os
...
@@ -4,7 +4,7 @@ import os
import
time
import
time
import
pandas
as
pd
import
pandas
as
pd
from
DrissionPage
import
ChromiumPage
from
DrissionPage
import
ChromiumPage
,
ChromiumOptions
from
DrissionPage.errors
import
PageDisconnectedError
from
DrissionPage.errors
import
PageDisconnectedError
from
helper
import
helper
from
helper
import
helper
...
@@ -12,8 +12,12 @@ from helper import helper
...
@@ -12,8 +12,12 @@ from helper import helper
email
=
None
email
=
None
password
=
None
password
=
None
page
=
ChromiumPage
()
# 创建配置对象(默认从 ini 文件中读取配置)
page
.
set
.
load_mode
.
normal
()
# 设置为normal模式
co
=
ChromiumOptions
()
# 设置不加载图片、静音
co
.
no_imgs
(
True
)
.
mute
(
True
)
page
=
ChromiumPage
(
addr_or_opts
=
co
)
page
.
set
.
load_mode
.
eager
()
page
.
set
.
when_download_file_exists
(
'overwrite'
)
page
.
set
.
when_download_file_exists
(
'overwrite'
)
# 下载目录
# 下载目录
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment