Re: Linky-style extension in Python



On Sun, 2006-17-09 at 02:41 +0200, yachar wrote:

> I looked at the sample python extensions in epiphany-extensions CVS, and
> I  had a look at epiphany reference documentation, but I couldn't find
> any way to "parse" the links in the page and build another tab with all
> images loaded in it.
> 
> Are epiphany-extensions able to do such things in Python ? Is there any
> existing project and / or documentation about such an extension ? Where
> could I find a bit of code I could take inspiration from ?

At the moment, this isn't supported. PyXPCOM will let us play with this
sort of things, but we don't have the hooks written yet (and PyXPCOM
isn't part of any distributions yet). This is simply a matter of no
developers taking on the job: we *all* would *love* to integrate with
PyXPCOM. (If anybody listening is interested in doing this, I can
provide a preliminary patch which worked a year ago, and a code review
suggesting improvements. The biggest part of the job wouldn't be the
patch, though. It would be evangelism: getting distributions to ship
PyXPCOM. Or technical: find a way to make PyXPCOM "optional", and find
an easy way to distribute it.)

Without PyXPCOM, you *could* implement a workaround. See error-viewer or
view-source for code (in C) which downloads the current page's source
code. You could do the same thing in Python, and parse the page with a
Python HTML parser. This is undesirable (Mozilla has a better HTML
parser), but it's the best you can do without delving into PyXPCOM.

-- 
Adam Hooper

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]