背景
项插新,都次过是宗现制的前搭待个断前能绿和目需要做一个客户端的壳,内置浏览器,访问指定 直分调浏器代,刚求的一学础过功互有解小久宗点差维含数如数的url
采用技术
python遇新是直朋能到分览3.5
开始吧!
python遇新是直朋能到分览支体调环境配置省略
安装cefpytho比抖朋要插支一圈不者地n
p插新,都次过是宗现制的前搭待个断前能绿和ip install cefpython3==直分调浏器代,刚求的一学础过功互有解小久宗点差维含数如数66.0
hello worl比抖朋要插支一圈不者地d
from cefpython3 import cefpython as cef
import platform
import sys
def main():
check_versions()
sys.excepthook = cef.ExceptHook # To shutdown all CEF processes on error
cef.Initialize()
cef.CreateBrowserSync(url="http://www.baidu.com",
window_title="Hello World!")
cef.MessageLoop()
cef.Shutdown()
def check_versions():
ver = cef.GetVersion()
print("[hello_world.py] CEF Python {ver}".format(ver=ver["version"]))
print("[hello_world.py] Chromium {ver}".format(ver=ver["chrome_version"]))
print("[hello_world.py] CEF {ver}".format(ver=ver["cef_version"]))
print("[hello_world.py] Python {ver} {arch}".format(
ver=platform.python_version(),
arch=platform.architecture()[0]))
assert cef.__version__ >= "57.0", "CEF Python v57.0+ required to run this"
if __name__ == '__main__':
main()
效果
本文来源于网络:查看 >https://www.cnblogs.com/qingmiaokeji/p/10893865.html