Skip to content
This repository has been archived by the owner on Feb 28, 2019. It is now read-only.

Commit

Permalink
Add an alternative javascript redirect in html redirect page
Browse files Browse the repository at this point in the history
  • Loading branch information
aploium committed May 6, 2016
1 parent 5f2dac7 commit d78aef3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions EasyWebsiteMirror.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,19 @@ def generate_html_redirect_page(target_url, msg='', delay_sec=1):
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>重定向 Page Redirect</title>
<title>重定向 (Page Redirect)</title>
<meta http-equiv="refresh" content="%d; url=%s">
<script>setTimeout(function(){location.href="%s"} , %d000);</script>
</head>
<body>
<pre>%s</pre>
<hr />
You are now redirecting to <a href="%s">%s</a>, if it not automatically, please click that link.
You are now redirecting to <a href="%s">%s</a>, if it didn't redirect automatically, please click that link.
</body>
</html>""" % (delay_sec, html_escape(target_url), html_escape(msg), html_escape(target_url), html_escape(target_url))
</html>""" % (
delay_sec, html_escape(target_url), html_escape(target_url), delay_sec + 1,
html_escape(msg), html_escape(target_url), html_escape(target_url)
)
resp_content = resp_content.encode('utf-8')
return Response(response=resp_content)

Expand Down

0 comments on commit d78aef3

Please sign in to comment.