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
e0e2587f
Commit
e0e2587f
authored
Jul 11, 2023
by
JinyinQiao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-liyang' of
http://39.105.40.203/liyang/network-assets-reptile
into dev-liyang
parents
f321ea01
3769935a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
pc_ptt.py
pc_ptt.py
+14
-8
No files found.
pc_ptt.py
View file @
e0e2587f
...
@@ -120,14 +120,20 @@ def reptile(browser=None, search_word=""):
...
@@ -120,14 +120,20 @@ def reptile(browser=None, search_word=""):
"link"
:
browser_current_url
,
"link"
:
browser_current_url
,
"reptileTime"
:
str
(
int
(
time
.
time
()))
"reptileTime"
:
str
(
int
(
time
.
time
()))
}
}
# 使用正则表达式进行匹配
matches
=
re
.
findall
(
search_word
,
element_title
.
text
)
# ------------------------------------------------------
# 打印匹配结果
if
matches
:
# log.debug(f"找到了匹配的字符串:{matches}")
data
.
append
(
obj
)
data
.
append
(
obj
)
else
:
# # 使用正则表达式进行匹配
log
.
debug
(
"未找到匹配的字符串"
)
# matches = re.findall(search_word, element_title.text)
# # 打印匹配结果
# if matches:
# # log.debug(f"找到了匹配的字符串:{matches}")
# data.append(obj)
# else:
# log.debug("未找到匹配的字符串")
# ------------------------------------------------------
# 浏览器返回上一页
# 浏览器返回上一页
browser
.
back
()
browser
.
back
()
element_list
=
browser
.
find_elements
(
'xpath'
,
"//div[@class='r-ent']//div[@class='title']//a"
)
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