mirror of
https://github.com/tenox7/wrp.git
synced 2024-11-25 13:30:51 +00:00
Sets title from read one.
This commit is contained in:
parent
afc5e5724d
commit
762a3822f7
17
wrp.py
17
wrp.py
@ -240,8 +240,13 @@ if sys.platform == "linux" or sys.platform == "linux2":
|
|||||||
% (__version__))
|
% (__version__))
|
||||||
httpout.write("<!-- Request for [%s] frame [%s] -->\n"
|
httpout.write("<!-- Request for [%s] frame [%s] -->\n"
|
||||||
% (WebkitRenderer.req_url, web_url))
|
% (WebkitRenderer.req_url, web_url))
|
||||||
httpout.write("<HTML><HEAD><TITLE>WRP%s:%s</TITLE></HEAD>\n<BODY>\n"
|
httpout.write("<HTML><HEAD>")
|
||||||
% (__version__, web_url))
|
# Get title
|
||||||
|
for ttl in frame.findAllElements('title'):
|
||||||
|
httpout.write((u"<TITLE>%s</TITLE>"
|
||||||
|
% ttl.toPlainText()).encode('utf-8', errors='ignore'))
|
||||||
|
break # Don't repeat bad HTML coding with several title marks
|
||||||
|
httpout.write("</HEAD>\n<BODY>\n")
|
||||||
|
|
||||||
if ISMAP == "true":
|
if ISMAP == "true":
|
||||||
httpout.write("<A HREF=\"http://%s\">"
|
httpout.write("<A HREF=\"http://%s\">"
|
||||||
@ -535,8 +540,12 @@ elif sys.platform == "darwin":
|
|||||||
% (__version__))
|
% (__version__))
|
||||||
httpout.write("<!-- Request for [%s] frame [%s] -->\n"
|
httpout.write("<!-- Request for [%s] frame [%s] -->\n"
|
||||||
% (WebkitLoad.req_url, web_url))
|
% (WebkitLoad.req_url, web_url))
|
||||||
httpout.write("<HTML><HEAD><TITLE>WRP%s:%s</TITLE></HEAD>\n<BODY>\n"
|
# Get title
|
||||||
% (__version__, web_url))
|
for ttl in frame.findAllElements('title'):
|
||||||
|
httpout.write((u"<TITLE>%s</TITLE>"
|
||||||
|
% ttl.toPlainText()).encode('utf-8', errors='ignore'))
|
||||||
|
break # Don't repeat bad HTML coding with several title marks
|
||||||
|
httpout.write("</HEAD>\n<BODY>\n")
|
||||||
if ISMAP == "true":
|
if ISMAP == "true":
|
||||||
httpout.write("<A HREF=\"http://%s\">"
|
httpout.write("<A HREF=\"http://%s\">"
|
||||||
"<IMG SRC=\"http://%s\" ALT=\"wrp-render\" ISMAP>\n"
|
"<IMG SRC=\"http://%s\" ALT=\"wrp-render\" ISMAP>\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user