Release Mouseless Web Browser
#1
Hi there,

here I release my new project "Mouseless Web Browser" for Kodi. Different from some of my older solutions with IE/FF I use phantomjs to capture web pages. phantomjs is a webkit and it is available for different operation systems. I use Java injection to add numbers to the links, so it is possible to navigate with "numbers" for example „12 - OK“. The pages are not shown live, just the image of a site. With the remote you can scroll up/down to view the whole page. Of course displaying of videos is impossible. Later on maybe a extraction of video will be available too.

Download my repro:

Mark's Repro

Here are the key features:

-independent from the browser / system
phantomjs, download phantomjs for Windows (Website)
phantomjs, phantomjs for Raspberry 2-3
phantomjs, phantomjs for Raspberry 1-2-3

-the browser can be navigate via remote, alternate input 0-9 or via context menu
-favorites
-navigation
-history of the season
-zoom of the pages
-tested for PC and Raspberry

After installation you need to set the path to phantomjs (to download before)
Enter the links with http://
Cache for the favorites will be done once, just wait a bit

Buttons / Remote
0-9 0-9 Link no. Input
Enter OK Input a link using 0-9
NEXT . URL input
PREV , History back
STOP X show favorites
BACK ESC back to the menu
PLAY PLAY Plays video if detected (does not work on all streams)

CONT C Context menu

Known problems:

-no input fields
-Some websites are not working (todo more test)
-not working on win system with non ut-f8 characters (bug in python 2.x)

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image
Reply
#2
Looks promising. Can't wait to test!
Reply
#3
Blush It's in my repro, you need to download the zip from the first post.

Install the zip in Kodi (you need to enable external source)
Open "install from Repo" and select "Marks Addons"
Select "Programm Addons"
Install "Mouseless Web Browser"

Depending on the system download phantomjs for win/raspberry and unzip the execute file to a folder.
For windows you need only the phantomjs.exe
For the raspberry the zip contains only the phantomjs which is the executable

In the setup of the browser you need to set the path to the phantomjs
Reply
#4
Interesting. Can I see the source code?
Reply
#5
Smile of course,

just uploaded the code to my github acount:

GITHUB
Reply
#6
phantomjs is outdated and their webkit is full of CVEs, nobody should be using that.
chrome has --headless mode that you can control with chromedriver/selenium
Reply
#7
(2017-03-13, 08:56)V8MEM Wrote: phantomjs is outdated and their webkit is full of CVEs, nobody should be using that.
chrome has --headless mode that you can control with chromedriver/selenium
Excellent, please post your implementation asap.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#8
A mouseless browser would be nice for Android TV OS.
Reply
#9
This would be perfect as screensaver (like open a dakboard or something like it while the kodi is inactive) is it to complicated to adapt it into one?
Reply
#10
Yes I will test with HADashboard when I get a chance.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#11
Hi there

I rework part of the code to allow the usage of the context menu for controlling the web browser. This mainly fit all of my remotes even I do not have keys 1-9. Additional I added language support and buggalo debug script.

Actual version now is 0.1.0. Grab my repro or update the script.
Reply
#12
I can't seem to get this to work. I am using ubuntu, I installed phantomjs from apt-get which gave me version 1.9.0. Kodi version is 17.3.

Whatever web page I use I get "load page error - could not load page" message pop up.

log extract:
Code:
18:28:30.478 T:140440416941824   DEBUG: CPythonInvoker(63, /home/nick/.kodi/addons/script.web.browser/main.py): start processing
18:28:30.532 T:140440416941824   DEBUG: -->Python Interpreter Initialized<--
18:28:30.533 T:140440416941824   DEBUG: CPythonInvoker(63, /home/nick/.kodi/addons/script.web.browser/main.py): the source file to load is "/home/nick/.kodi/addons/script.web.browser/main.py"
18:28:30.533 T:140440416941824   DEBUG: CPythonInvoker(63, /home/nick/.kodi/addons/script.web.browser/main.py): setting the Python path to /home/nick/.kodi/addons/script.web.browser:/home/nick/.kodi/addons/script.module.buggalo/lib:/home/nick/.kodi/addons/script.module.simplejson/lib:/usr/local/lib/python2.7/dist-packages/pylms-1.0-py2.7.egg:/usr/lib/python2.7:/usr/lib/python2.7/plat-x86_64-linux-gnu:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload:/usr/local/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages/PILcompat:/usr/lib/python2.7/dist-packages/gtk-2.0:/usr/lib/python2.7/dist-packages/ubuntu-sso-client
18:28:30.533 T:140440416941824   DEBUG: CPythonInvoker(63, /home/nick/.kodi/addons/script.web.browser/main.py): entering source directory /home/nick/.kodi/addons/script.web.browser
18:28:30.533 T:140440416941824   DEBUG: CPythonInvoker(63, /home/nick/.kodi/addons/script.web.browser/main.py): instantiating addon using automatically obtained id of "script.web.browser" dependent on version 2.7.0 of the xbmc.python api
18:28:30.927 T:140440416941824   DEBUG: [Warning] CGUITextureManager::GetTexturePath: could not find texture 'OSDPlay.png'
18:28:31.011 T:140440416941824   DEBUG: BROWSER load page http://www.demon.net/
18:28:31.011 T:140441232111616   DEBUG: Activating window ID: 10138
18:28:31.011 T:140441232111616   DEBUG: ------ Window Init (DialogBusy.xml) ------
18:28:31.011 T:140440416941824   DEBUG: BROWSER zoom 1.0
18:28:31.043 T:140440416941824   DEBUG: BROWSER [Errno 2] No such file or directory
18:28:31.045 T:140441232111616   DEBUG: ------ Window Init (DialogNotification.xml) ------
18:28:31.056 T:140441232111616   DEBUG: Activating window ID: 13000
18:28:31.075 T:140441232111616   DEBUG: ------ Window Deinit (DialogBusy.xml) ------
18:28:31.370 T:140441232111616   DEBUG: ------ Window Deinit (Home.xml) ------
18:28:31.370 T:140441232111616   DEBUG: ------ Window Init () ------
18:28:33.124 T:140441232111616   DEBUG: Keyboard: scancode: 0x40, sym: 0x0134, unicode: 0x0000, modifier: 0x100
18:28:33.124 T:140441232111616   DEBUG: OnKey: alt-leftalt (0x4f0d4) pressed, action is
18:28:34.834 T:140441232111616   DEBUG: ------ Window Deinit (DialogNotification.xml) ------
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#13
I works for me, meaning:

Using win 7 32 bit
Using Kodi 17.1
I installed phantomjs from the phantomjs homepage (version 2.1.1)
I installed Mark's repo
I installed the addon
Entered the path to phantomjs in the addon config
Entered this thread as homepage in the addon config
Pushed "run" (sits left of the addon config button)

I got the wanted web page.


Haven't experimented further with it (how to call it from another addon...), but it seems as something I want to use in a project of mine...

Mark, thanks for making this...
Add-on : Bluray iso utils Rewrite of BR_iso_enhancements
Add-on : BR_iso_Enhancements Give theatrical & directors cut from the same bluray iso each their own library entry, use bluray iso's of tv shows as if they are already ripped.
Reply
#14
(2017-05-28, 08:30)nickr Wrote: I can't seem to get this to work. I am using ubuntu, I installed phantomjs from apt-get which gave me version 1.9.0. Kodi version is 17.3.

I don't know the reason, but PhantomJS 1.9.0 is pretty outdated and has problems with modern JavaScript.
Reply

Logout Mark Read Team Forum Stats Members Help
Mouseless Web Browser0