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
8229ccc5
Commit
8229ccc5
authored
Jul 20, 2023
by
liyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:debug ptt
parent
c26c82da
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
pc_facebook.py
pc_facebook.py
+2
-2
pc_ptt.py
pc_ptt.py
+4
-3
pc_twitter.py
pc_twitter.py
+1
-2
pc_youtube.py
pc_youtube.py
+2
-2
No files found.
pc_facebook.py
View file @
8229ccc5
...
@@ -167,10 +167,10 @@ def reptile(browser=None, search_word=""):
...
@@ -167,10 +167,10 @@ def reptile(browser=None, search_word=""):
try
:
try
:
browser
.
close
()
browser
.
close
()
browser
.
quit
()
browser
.
quit
()
sys
.
exit
()
except
:
except
:
log
.
debug
(
"浏览器驱动关闭失败"
)
log
.
debug
(
"浏览器驱动关闭失败"
)
sys
.
exit
()
def
main
():
def
main
():
"""
"""
...
...
pc_ptt.py
View file @
8229ccc5
...
@@ -101,7 +101,8 @@ def reptile(browser=None, search_word=""):
...
@@ -101,7 +101,8 @@ def reptile(browser=None, search_word=""):
div_elements
=
soup
.
find_all
(
'div'
)
div_elements
=
soup
.
find_all
(
'div'
)
# log.debug("一级div数量:" + str(len(div_elements)))
# log.debug("一级div数量:" + str(len(div_elements)))
# 逐个删除这些元素
# 逐个删除这些元素
for
div
in
div_elements
:
for
key
,
div
in
enumerate
(
div_elements
):
if
key
>
0
:
div
.
extract
()
div
.
extract
()
# 删除第一级span
# 删除第一级span
span_element
=
soup
.
find_all
(
'span'
)
span_element
=
soup
.
find_all
(
'span'
)
...
@@ -207,9 +208,9 @@ def reptile(browser=None, search_word=""):
...
@@ -207,9 +208,9 @@ def reptile(browser=None, search_word=""):
try
:
try
:
browser
.
close
()
browser
.
close
()
browser
.
quit
()
browser
.
quit
()
sys
.
exit
()
except
:
except
:
log
.
debug
(
"浏览器驱动关闭失败"
)
log
.
debug
(
"浏览器驱动关闭失败"
)
sys
.
exit
()
def
main
():
def
main
():
...
...
pc_twitter.py
View file @
8229ccc5
...
@@ -167,10 +167,9 @@ def reptile(browser=None, search_word=""):
...
@@ -167,10 +167,9 @@ def reptile(browser=None, search_word=""):
try
:
try
:
browser
.
close
()
browser
.
close
()
browser
.
quit
()
browser
.
quit
()
sys
.
exit
()
except
:
except
:
log
.
debug
(
"浏览器驱动关闭失败"
)
log
.
debug
(
"浏览器驱动关闭失败"
)
sys
.
exit
()
def
main
():
def
main
():
"""
"""
...
...
pc_youtube.py
View file @
8229ccc5
...
@@ -82,10 +82,10 @@ def reptile(browser=None, search_word=""):
...
@@ -82,10 +82,10 @@ def reptile(browser=None, search_word=""):
try
:
try
:
browser
.
close
()
browser
.
close
()
browser
.
quit
()
browser
.
quit
()
sys
.
exit
()
except
:
except
:
log
.
debug
(
"浏览器驱动关闭失败"
)
log
.
debug
(
"浏览器驱动关闭失败"
)
sys
.
exit
()
def
main
():
def
main
():
"""
"""
...
...
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