1 Star 2 Fork 1

john_xu / book118网站pdf下载器

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
html_frame_writer.py 759 Bytes
一键复制 编辑 原始数据 按行查看 历史
john_xu 提交于 2019-08-12 22:44 . 强制等待,降低漏下载可能性
class HtmlFrameWriter:
def add_start(self,path):
path=path.split(r"/")[-1]
#print(path)
style="""<style> div.frame {position:absolute;color:transparent} body {width:792px;height:1120px;background-image: url("""
style=style+path
style=style+""");background-repeat:no-repeat;border:1px solid black;margin:0px}</style>"""
begain="<html><head>{}</head><body>".format(style)
return begain
def add_div(self,words,width,top,height,left,path):
div="""<div class="frame" id="{}" style="width:{}px;height:{}px;top:{}px;left:{}px">{}</div>""".format(path,width,height,top,left,words)
return div
def add_end(self):
end="</body></html>"
return end
Python
1
https://gitee.com/john_xu/book118_pdf_downloader.git
git@gitee.com:john_xu/book118_pdf_downloader.git
john_xu
book118_pdf_downloader
book118网站pdf下载器
master

搜索帮助