有熟悉cefpython3的吗,如何获取到cookie呢
内嵌的网页浏览器,希望用户登录后返回cookie的信息,请问这个有什么方法可以获取到呢?此代码可以打开网页,但如何可以跟踪监听用户登录后返回的cookie呢?
from cefpython3 import cefpython as cef
from cefpython3 import *
from tkinter import *
import threading
def embed_browser_thread(frame, _rect):
window_info = cef.WindowInfo(frame.winfo_id())
window_info.SetAsChild(frame.winfo_id(), _rect)
cef.Initialize()
cef.CreateBrowserSync(window_info, url='https://fishc.com.cn/search.php')
cef.MessageLoop()
cef.Shutdown()
if __name__ == '__main__':
root = Tk()
root.geometry("1200x600")
frame1 = Frame(root,height=600)
frame1.pack(side=TOP, fill=X)
rect =
thread = threading.Thread(target=embed_browser_thread, args=(frame1, rect))
thread.start()
root.mainloop()
页:
[1]