Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
network-assets-reptile
Project
Project
Details
Activity
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
liyang
network-assets-reptile
Commits
f71f84a0
Commit
f71f84a0
authored
Jul 27, 2023
by
liyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:ptt 加速
parent
9ea6170b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
pc_ptt.py
pc_ptt.py
+4
-0
No files found.
pc_ptt.py
View file @
f71f84a0
...
...
@@ -47,14 +47,18 @@ def reptile(browser=None, search_word=""):
# 暂时先爬取 第2个 分类
if
0
<=
index
<
4
:
type_title
=
classify_item_list
[
index
]
.
text
# 进入分类页面
classify_item_list
[
index
]
.
click
()
time
.
sleep
(
0.1
)
# 综合分类需要确认已满18周岁
if
index
==
0
:
try
:
button
=
browser
.
find_element
(
"xpath"
,
"//form/div[1]//button"
)
button
.
click
()
except
:
error
=
""
wait
=
WebDriverWait
(
browser
,
10
)
wait
.
until
(
EC
.
presence_of_element_located
((
By
.
XPATH
,
"//div[@class='r-ent']"
)))
element_list
=
browser
.
find_elements
(
'xpath'
,
"//div[@class='r-ent']//div[@class='title']//a"
)
...
...
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