Release - Web Viewer - Programs Addon & Module

  Thread Rating:
  • 3 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
ruuk Offline
Skilled Python Coder
Posts: 1,461
Joined: Aug 2005
Reputation: 182
Location: Bremerton, WA USA
Thumbs Up  Web Viewer - Programs Addon & Module
Post: #1
[Image: webviewer.jpg]

Web Viewer is a linear text web browser. It is linear because it doesn't render pages, it filters them and displays text in the order it is found in the original HTML.

Get the latest version on my REPO.
If you need help, ask a question in this thread or join #ruuk on freenode.


What it does:
* You can follow links, fill out forms, view images
* Stream video/audio links
* It has back/forward history
* Bookmarks

What it doesn't do:
* Handle style sheets, javascript, flash, etc.
* Make web pages look good Smile
* Lots of other stuff

Web viewer also allows addon developers to process application authorization (ie. facebook,flickr etc.) with little programming and without violating terms of use and also provides the ability to show web pages directly from an addon.

The basic usage as of v0.7.4 is:

from webviewer import webviewer

url, html = webviewer.getWebResult(url,autoForms=[],autoClose=None,dialog=False)

This returns the url and html of the page when the browser was closed.

The autoforms parameter is for auto selecting forms and is a list of dicts as follows:

{ 'name': 'exact name of form',
'action': 'a substring of the form action',
'index': 'index of the form in the html' }

A match will occur if any of the items in the dict matches,
except if name or action matches and index is defined, the index must also match.

The autoClose parameter is for matching a page where the window should close.
If matched it will present a dialog asking to close with the provided heading and message.
It is a dict as follows:

{ 'url': 'regex to match against page url',
'html': 'regex to match against page html',
'heading': 'heading for dialog',
'message': 'message for dialog' }

You can specify url, html, or both. A match will only occur if all provided regular expressions match.

Setting the dialog parameter to true will cause the browser to open as a dialog instead as a normal window.

[Image: screenshot027.jpg]

[Image: sig.jpg]
(This post was last modified: 2014-06-03 21:33 by ruuk.)
find quote
fillidill Offline
Member
Posts: 84
Joined: Oct 2009
Reputation: 0
Post: #2
Good work, ruuk! This is one step closer to a real integrated web browser. Seems to work as it should without any problems.
find quote
jolid Offline
Senior Member
Posts: 127
Joined: Jul 2010
Reputation: 0
Location: Gothenburg, Sweden
Post: #3
Nice one! Tried it and it works. Interesting to see in what ways this could be used, subscribing..
find quote
ruuk Offline
Skilled Python Coder
Posts: 1,461
Joined: Aug 2005
Reputation: 182
Location: Bremerton, WA USA
Post: #4
jolid Wrote:Nice one! Tried it and it works. Interesting to see in what ways this could be used, subscribing..

Well, so far it handles authorization in my facebook image plugin, and allows you to follow links in my Forum Browser addon. I've finished the work for it handling authorization for my flickr image plugin and that will be on the repo soon. We'll see if anyone else but me finds it useful Smile

[Image: sig.jpg]
find quote
byxil Offline
Member
Posts: 66
Joined: Aug 2010
Reputation: 0
Location: Italy
Post: #5
Nice work, some days ago I open a treed to ask this (for my wife) Laugh
I try and work, but what's key are used? (I have a remote) only directional?
how close this app? I use cancel key, backspace not work...

thank
find quote
ruuk Offline
Skilled Python Coder
Posts: 1,461
Joined: Aug 2005
Reputation: 182
Location: Bremerton, WA USA
Post: #6
byxil Wrote:Nice work, some days ago I open a treed to ask this (for my wife) Laugh
I try and work, but what's key are used? (I have a remote) only directional?
how close this app? I use cancel key, backspace not work...

thank

If you can bring up the context menu, the help option will show the keys.

But here they are:

Left/Right = Previous/Next Link
Up/Down = Up/Down on line
Select = Open Link/View Image/Edit Form
|< Skip-/>| Skip+ = Page Up/Page Down
>> Fast Forward/<< Reverse = Browse Forward/Back
Play = Browser Refresh
Stop = Browser Stop
Pause = Bookmarks Menu
Back = Browser Back
Menu = Close Web Viewer
Info = Change focus to the Links/Images/Form display
Title = Context Menu

[Image: remote_portrait.png]

[Image: sig.jpg]
find quote
Appletvnoob Offline
Junior Member
Posts: 20
Joined: Sep 2010
Reputation: 0
Post: #7
interesting.... following this thread
find quote
rflores2323 Offline
Posting Freak
Posts: 1,920
Joined: Jan 2009
Reputation: 2
Post: #8
I see there is a simple configuration for the remote style (boxee) however most functions do not work on with an atv2 remote. Is there anyway you can map the function of the apple tv2 remote? Also it would be great to have a Close function on the menu.

ATV1 with crystalbuntu (12.2 frodo) as main theater. Theater remote URC MX-810, droidx with xbmc remote, or transformer tf101 with YATSE. 3 x ATV2 (V12.2 frodo).

find quote
ruuk Offline
Skilled Python Coder
Posts: 1,461
Joined: Aug 2005
Reputation: 182
Location: Bremerton, WA USA
Post: #9
rflores2323 Wrote:I see there is a simple configuration for the remote style (boxee) however most functions do not work on with an atv2 remote. Is there anyway you can map the function of the apple tv2 remote? Also it would be great to have a Close function on the menu.

Am I correct in assuming you are talking about the Web Viewer included with the Boxee Forum Browser? If so perhaps I would be better off using the Boxee Browser instead of Web Viewer. When I made the Boxee port of Forum Browser, I hadn't yet figured out a way of using the browser from an app.

[Image: sig.jpg]
find quote
dozens Offline
Junior Member
Posts: 27
Joined: Apr 2011
Reputation: 0
Post: #10
rflores2323 Wrote:I see there is a simple configuration for the remote style (boxee) however most functions do not work on with an atv2 remote. Is there anyway you can map the function of the apple tv2 remote? Also it would be great to have a Close function on the menu.

I need this app so that when using my ATV2 while staying in hotels I can "Agree to Terms" to use the internet, that's it. However I too am having the same issue as the above user, I cannot figure out how to close the browser using the ATV2 remote.
find quote
dozens Offline
Junior Member
Posts: 27
Joined: Apr 2011
Reputation: 0
Post: #11
Wait, now my XBMC says Web Viewer is 'Broken'? I uninstalled it and now can't reinstall? Sorry, I'm new to all this XBMC stuff.
find quote
ruuk Offline
Skilled Python Coder
Posts: 1,461
Joined: Aug 2005
Reputation: 182
Location: Bremerton, WA USA
Post: #12
dozens Wrote:However I too am having the same issue as the above user, I cannot figure out how to close the browser using the ATV2 remote.

Wait, now my XBMC says Web Viewer is 'Broken'? I uninstalled it and now can't reinstall? Sorry, I'm new to all this XBMC stuff.

Try this version:

http://webviewer-xbmc.googlecode.com/fil...-0.7.9.zip

It adds a close option to the menu, and should install fine from the zip I assume.

[Image: sig.jpg]
find quote
dozens Offline
Junior Member
Posts: 27
Joined: Apr 2011
Reputation: 0
Post: #13
Thank you, can you tell me exactly how to do so? i'm new to using OSX's Terminal and all that. I just installed Web Viewer from within XBMC before this and that's the only way I know how.
find quote
eTip Offline
Senior Member
Posts: 139
Joined: Apr 2011
Reputation: 0
Post: #14
Get Cyberduck for Mac then connect to your ATV via SFTP. Then you can drag and drop the zip file to ATV.
find quote
ruuk Offline
Skilled Python Coder
Posts: 1,461
Joined: Aug 2005
Reputation: 182
Location: Bremerton, WA USA
Post: #15
eTip Wrote:Get Cyberduck for Mac then connect to your ATV via SFTP. Then you can drag and drop the zip file to ATV.

Thanks for that, since my lack of an ATV unit makes it hard for me to answer these sorts of questions.

[Image: sig.jpg]
find quote
Post Reply