Advertisement
metalx1000

Webkit get page code

Feb 13th, 2015
557
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3. import webkit, gtk
  4.  
  5. def get_source(webobj, frame):
  6.   print "loading..."
  7.   x = web.get_main_frame().get_data_source().get_data()
  8.   print x
  9.  
  10. win = gtk.Window()
  11.  
  12. web = webkit.WebView()
  13. web.open("http://filmsbykris.com")
  14. web.connect("load-finished", get_source)
  15.  
  16. win.add(web)
  17.  
  18. #win.show_all()
  19.  
  20. gtk.main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement