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
efa3c130
Commit
efa3c130
authored
Aug 09, 2023
by
liyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:dcard debug
parent
e4bb3dae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
pc_dcard.py
pc_dcard.py
+4
-4
No files found.
pc_dcard.py
View file @
efa3c130
...
@@ -53,9 +53,9 @@ def reptile(browser=None, search_word=""):
...
@@ -53,9 +53,9 @@ def reptile(browser=None, search_word=""):
# 标题
# 标题
element_title_list
=
browser
.
find_elements
(
'xpath'
,
f
"{base_xpath}//h2"
)
element_title_list
=
browser
.
find_elements
(
'xpath'
,
f
"{base_xpath}//h2"
)
# 点赞
# 点赞
element_like_list
=
browser
.
find_elements
(
'xpath'
,
f
"{base_xpath}/div[3]/div[1]/div/div[2]"
)
#
element_like_list = browser.find_elements('xpath', f"{base_xpath}/div[3]/div[1]/div/div[2]")
# 评论
# 评论
element_comment_list
=
browser
.
find_elements
(
'xpath'
,
f
"{base_xpath}/div[3]/div[2]/div/span"
)
#
element_comment_list = browser.find_elements('xpath', f"{base_xpath}/div[3]/div[2]/div/span")
for
index
,
item
in
enumerate
(
element_content_list
):
for
index
,
item
in
enumerate
(
element_content_list
):
# 提取时间,并转为时间戳
# 提取时间,并转为时间戳
...
@@ -73,9 +73,9 @@ def reptile(browser=None, search_word=""):
...
@@ -73,9 +73,9 @@ def reptile(browser=None, search_word=""):
# 提取标题
# 提取标题
title
=
element_title_list
[
index
]
.
text
title
=
element_title_list
[
index
]
.
text
# 提取点赞
# 提取点赞
like
=
element_like_list
[
index
]
.
text
#
like = element_like_list[index].text
# 提取评论
# 提取评论
comment
=
element_comment_list
[
index
]
.
text
#
comment = element_comment_list[index].text
# -------------提取内容---------------
# -------------提取内容---------------
element_content_list
[
index
]
.
click
()
element_content_list
[
index
]
.
click
()
...
...
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