Here is my script:
from mechanize import *
from BeautifulSoup import *
import StringIO
b = Browser()
f = b.open("http://www.translate.ru/text.asp?lang=ru";)
b.select_form(nr=0)
b["source"] = "hello python"
html = b.submit().get_data()
soup = BeautifulSoup(html)
print soup.find("span", id = "r_tex
[EMAIL PROTECTED] wrote:
> Here is my script:
>
> from mechanize import *
> from BeautifulSoup import *
> import StringIO
> b = Browser()
> f = b.open("http://www.translate.ru/text.asp?lang=ru";)
> b.select_form(nr=0)
> b["source"] = "hello python"
> html = b.submit().get_data()
> soup = Beautiful
[EMAIL PROTECTED] wrote:
> Here is my script:
>
> from mechanize import *
> from BeautifulSoup import *
> import StringIO
> b = Browser()
> f = b.open("http://www.translate.ru/text.asp?lang=ru";)
> b.select_form(nr=0)
> b["source"] = "hello python"
> html = b.submit().get_data()
> soup = BeautifulS
Claudio Grondi wrote:
> [EMAIL PROTECTED] wrote:
> > Here is my script:
> >
> > from mechanize import *
> > from BeautifulSoup import *
> > import StringIO
> > b = Browser()
> > f = b.open("http://www.translate.ru/text.asp?lang=ru";)
> > b.select_form(nr=0)
> > b["source"] = "hello python"
> > htm
danielx wrote:
> [EMAIL PROTECTED] wrote:
> > Here is my script:
> >
> > from mechanize import *
> > from BeautifulSoup import *
> > import StringIO
> > b = Browser()
> > f = b.open("http://www.translate.ru/text.asp?lang=ru";)
> > b.select_form(nr=0)
> > b["source"] = "hello python"
> > html = b.su
In <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> Here is my script:
>
> from mechanize import *
> from BeautifulSoup import *
> import StringIO
> b = Browser()
> f = b.open("http://www.translate.ru/text.asp?lang=ru";)
> b.select_form(nr=0)
> b["source"] = "hello python"
> html = b.submit().get_
[EMAIL PROTECTED] wrote:
> Claudio Grondi wrote:
>
>>[EMAIL PROTECTED] wrote:
>>
>>>Here is my script:
>>>
>>>from mechanize import *
>>>from BeautifulSoup import *
>>>import StringIO
>>>b = Browser()
>>>f = b.open("http://www.translate.ru/text.asp?lang=ru";)
>>>b.select_form(nr=0)
>>>b["source"]
Claudio Grondi wrote:
> [EMAIL PROTECTED] wrote:
> > Claudio Grondi wrote:
> >
> >>[EMAIL PROTECTED] wrote:
> >>
> >>>Here is my script:
> >>>
> >>>from mechanize import *
> >>>from BeautifulSoup import *
> >>>import StringIO
> >>>b = Browser()
> >>>f = b.open("http://www.translate.ru/text.asp?lang
John Machin wrote:
> Claudio Grondi wrote:
>
>>[EMAIL PROTECTED] wrote:
>>
>>>Claudio Grondi wrote:
>>>
>>>
[EMAIL PROTECTED] wrote:
>Here is my script:
>
>from mechanize import *
>from BeautifulSoup import *
>import StringIO
>b = Browser()
>f =
Pak (or Andrei, whichever is your first name),
My proposal below:
- Original Message -
From: <[EMAIL PROTECTED]>
Newsgroups: comp.lang.python
To:
Sent: Sunday, July 30, 2006 8:52 PM
Subject: Re: Html character entity conversion
> danielx wrote:
> > [EMAIL P
Anthra Norell wrote:
import SE# Available at the Cheese Shop
I mean, that OP requested:
'How can I translate this using standard Python libraries??'
so it's just only not on topic.
Claudio Grondi
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> How can I convert encoded string
>
> sEncodedHtmlText = 'привет
> питон'
>
> into human readable:
>
> sDecodedHtmlText == 'пÑÐ¸Ð²ÐµÑ Ð¿Ð¸Ñон'
How about:
>>> sEncodedHtmlText = 'text:
приветпитоl
5;'
>>> def unescape(m):
return unichr(int(m.group(0)[2:-1]
- Original Message -
From: "Claudio Grondi" <[EMAIL PROTECTED]>
Newsgroups: comp.lang.python
To:
Sent: Tuesday, August 01, 2006 2:42 PM
Subject: Re: Html character entity conversion
> Anthra Norell wrote:
>
> >>>>import SE# Available at
[EMAIL PROTECTED] wrote:
> danielx wrote:
>> [EMAIL PROTECTED] wrote:
>>> Here is my script:
>>>
>>> from mechanize import *
>>> from BeautifulSoup import *
>>> import StringIO
>>> b = Browser()
>>> f = b.open("http://www.translate.ru/text.asp?lang=ru";)
>>> b.select_form(nr=0)
>>> b["source"] = "h
14 matches
Mail list logo