tibabenfortlapalanca at gmail.com
Tue Dec 8 09:01:32 UTC 2009
I'm developing a Seaside app that needs to retrieve a translation from
google translator, so I thought I'd use Soup.
So i go like:
*aSoup := Soup fromUrl: 'http://translate.google.com/#en|ca|'*
but i find that the fetched string is a bit different from the actual source
code i can see in Mozilla...
*results := aSoup findAllTags: **[:aTag |
*aTag name = 'span' and:
*[(aTag attributeAt: 'id') asString beginsWith: 'result_box']].*
results contains the correct tag, but the tag contains an empty string,
instead of the translation (it holds the translated string when I check the
HTML source in firefox)
Any ideas? I find it really awkward, I've worked with soup before and never
had such problem... so I'm kinda clueless.
Sorry if the question is a bit off-topic (not exactly a Seaside issue...), I
just guessed that a lot of seasiders sure must have dealt with Soup quite a
few times :)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside