Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
lichenggang
/
seo_checker
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8ae4da3a
authored
Oct 08, 2019
by
lichenggang
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
errors=ignore
parent
cb177d7e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
server_test.py
server_test.py
View file @
8ae4da3a
...
@@ -67,7 +67,8 @@ class SeoCheckHandler(TornadoBaseHandler):
...
@@ -67,7 +67,8 @@ class SeoCheckHandler(TornadoBaseHandler):
snap_shot_url
=
dom
.
xpath
(
'//a[contains(text(),"百度快照")]/@href'
)[
0
]
snap_shot_url
=
dom
.
xpath
(
'//a[contains(text(),"百度快照")]/@href'
)[
0
]
detail_headers
[
'Referer'
]
=
detail_referer
.
format
(
target
)
detail_headers
[
'Referer'
]
=
detail_referer
.
format
(
target
)
async
with
self
.
proxy_request
(
snap_shot_url
,
headers
=
main_headers
,
allow_redirects
=
True
)
as
resp
:
async
with
self
.
proxy_request
(
snap_shot_url
,
headers
=
main_headers
,
allow_redirects
=
True
)
as
resp
:
detail
=
await
resp
.
text
()
detail
=
await
resp
.
read
()
detail
=
detail
.
decode
(
encoding
=
'gb2312'
,
errors
=
'ignore'
)
snap_time
=
snap_time_pat
.
findall
(
detail
)
snap_time
=
snap_time_pat
.
findall
(
detail
)
if
snap_time
:
if
snap_time
:
data
[
'included_time'
]
=
snap_time
[
0
]
data
[
'included_time'
]
=
snap_time
[
0
]
...
...
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