I have build a simple dedicated browser (like Prism) which I use for different sites. Sadly Google+ blocks all browsers, but four. So it blocks mine too.
How can I set the User-Agent in MozEmbed, so I can tell Goolge, I am using Firefox?
mozembed = gtkmozembed.MozEmbed()
mozembed.load_url("https://plus.google.com")
mozembed.show()
Sorry, haven’t tested it, because my Mozilla stuff is inherently broken atm.
One way to set it is to create custom settings file prefs.js and set that directory as profile directory:
Now, gtkmozembed should read preferences from
~/.config/mozilla/foo/prefs.js. Example custom user-agent entry:Another option would be to overload the
gtkmozembed.*_streamfunctions to inject customUser-Agentheader usingurllib2.PS. Try out WebkitGTK+ and gobject-introspection. Mozilla and GTK+ is a bit broken since Gtk+-3.