从 Wix 站点中提取源代码(HTML、CSS)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32727817/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Extracting source code (HTML, CSS) from Wix sites
提问by Michael Simpson
I've spent 3 hours perfecting a site on Wix. I need to get the HTML and CSS so that I can publish it on my own hosting service. Thank you.
我花了 3 个小时在 Wix 上完善了一个网站。我需要获取 HTML 和 CSS,以便我可以在我自己的托管服务上发布它。谢谢你。
回答by bmrs
回答by kotbeg
You would have to parse your page, some frames will not get parsed though, but adding pics and videos and such you can do after, just learn how to add it to your html. I can post the code, but that has to be adjusted for your needs.
您将不得不解析您的页面,尽管某些框架不会被解析,但是添加图片和视频等之后您就可以进行操作,只需学习如何将其添加到您的 html 中即可。我可以发布代码,但必须根据您的需要进行调整。
from selenium import webdriver
driver = self.driver
html_source = driver.page_source
with codecs.open(path+'/scratch.html', 'w', encoding='utf8') as f:
f.write(html_source)
f.close
回答by Simon Egli
You might use WinHTTrack to download the offline website
您可以使用 WinHTTrack 下载离线网站
回答by Malf
It is not possible to export files, pages or sites, created using the Wix Editor, to another external destination or host. All Wix sites must be hosted on the Wix servers.
无法将使用 Wix 编辑器创建的文件、页面或站点导出到另一个外部目标或主机。所有 Wix 站点都必须托管在 Wix 服务器上。
It is also not possible to embed your Wix site onto an external site.
也无法将您的 Wix 站点嵌入到外部站点中。
When you embed a site into an external location, Wix is no longer in control of the way that your site appears or functions, and therefore, cannot provide support. In addition, Google Analytics and search engine crawlers are not able to work properly with an embedded site.
当您将站点嵌入到外部位置时,Wix 不再控制站点的显示或运行方式,因此无法提供支持。此外,Google Analytics 和搜索引擎爬虫无法与嵌入式站点一起正常工作。