html om parser: what do you prefer?
#1
I absolutely need an helper for html scraping.

I'm looking at parsedom, but I cannot find it in the repository.
I'd like to use beautiful soap, but ... how can I include this in my plugin deployment? [and development...] ?
Reply
#2
beautiful soup is in the official repo, so just include it in the depends section in your addon.xml

Aside from that, I use regex and it's pretty simple once you get the hand of it
Reply
#3
(2014-01-21, 00:25)realtebo Wrote: I absolutely need an helper for html scraping.

I'm looking at parsedom, but I cannot find it in the repository.
I'd like to use beautiful soap, but ... how can I include this in my plugin deployment? [and development...] ?

I would also suggest using BeatifulSoup (3).

To use it in your add-on you first need to add it as dependency: Add this to the requirements section in your addon.xml:
PHP Code:
<import addon="script.module.beautifulsoup" version="3.0.8"/> 
Then you can import and use it:
PHP Code:
from BeautifulSoup import BeautifulSoup 

Keep in mind that XBMC only resolves dependencies when an add-on gets installed - if you just add it to your addon.xml (without installing it) it doesnt get installed, just install any other add-on which has the same dependency.
My GitHub. My Add-ons:
Image
Reply
#4
.. could be my environment the problem? I'm using xbmc on windows 8.1, but using exactly 2 rows as you write, xbmc complain about no beautiful soap found ....
Reply
#5
Is script.module.beautifulsoup showing up in your addons folder?
Reply
#6
This is my addon directory 'fresh of install' plus plugin.video.jworg [it's mine]


Image

in the programm addon dir there is only one script.module and is script.module.pil

So if the default install has no beautiful soap installed, how can I use it ?
Reply
#7
Like I already told:

(2014-01-21, 08:54)sphere Wrote: Keep in mind that XBMC only resolves dependencies when an add-on gets installed - if you just add it to your addon.xml (without installing it) it doesnt get installed, just install any other add-on which has the same dependency.

Install any XBMC-add-on which also requires Beautifulsoup, e.g. Apple iTunes Trailers.
My GitHub. My Add-ons:
Image
Reply
#8
Wow , so simple, I've not thinked at this way.

Thanks.
Reply
#9
(2014-01-21, 00:25)realtebo Wrote: I'm looking at parsedom, but I cannot find it in the repository.
That's what I'm using (it's detailed here)
I can't believe people use that horrible beautifulsoup...
Reply

Logout Mark Read Team Forum Stats Members Help
html om parser: what do you prefer?0