[Gambas-user] Web application - CURL and Cookies?

Ron_1st ronstk at ...239...
Tue Dec 30 22:22:54 CET 2008


On Tuesday 30 December 2008, Rob wrote:
> On Tuesday 30 December 2008 15:31, birchy wrote:
> > 1) Does Gambas implement the libcurl library or does it use curl via a
> > command prompt?
> 
> Gambas (specifically gb.net.curl) uses libcurl.
> 
> > 2) I have still not found a satisfactory HTML parsing library because
> > many of the values i want to extract are within JavaScript tags. Many
> > people suggest using BeautifulSoup, but i don't know if i can use this
> > within Gambas?? I can parse the document manually using string functions
> 
> If the document you want to parse is XHTML, you could try using gb.xml.  
> Unfortunately, that seems to be undocumented right now.  
> 
> If it's a legacy HTML document, libxml does have an HTML parser available, 
> but it seems that gb.xml doesn't expose that functionality at present so 
> you'd need to use external function declarations to use it.
> 
> Rob
> 

I found problems with xml parsing while the html pages are not
always valid written but could pass w3c check.
Second it needs the XML doctype as first line and that
is not available when the page is get from the web.
Cold solved by adding yourself of course but then it is
also required the tags are lowercase.
A global to lowercase cant be done, contest corrupting, and do it
for tags and attributes only is just to point how to get them correct.
its a part of chicken and egg here.


Good 2009 to all

Best regards,

Ron_1st





More information about the User mailing list