how can i use lxml with win32com?

elca highcar at gmail.com
Sun Oct 25 12:12:08 CET 2009




paul kölle wrote:
> 
> elca schrieb:
>> Hi,
>> thanks a lot.
>> studying alone is tough thing :)
>> how can i improve my skill... 
> 1. Stop top-posting.
> 2. Read documentation
> 3. Use the interactive prompt
> 
> cheers
>   Paul
> 
>> 
>> 
>> paul kölle wrote:
>>> elca schrieb:
>>>> Hello,
>>> Hi,
>>>
>>>> following is script source which can  beautifulsoup and PAMIE work
>>>> together.
>>>> but if i run this script source error was happened.
>>>>
>>>> AttributeError: PAMIE instance has no attribute 'pageText'
>>>> File "C:\test12.py", line 7, in <module>
>>>>   bs = BeautifulSoup(ie.pageText()) 
>>> You could execute the script line by line in the python console, then 
>>> after the line "ie = PAMIE(url)" look at the "ie" object with "dir(ie)" 
>>> to check if it really looks like a healthy instance. ...got bored, just 
>>> tried it -- looks like pageText() has been renamed to getPageText().
>>> Try:
>>> text = PAMIE('http://www.cnn.com').getPageText()
>>>
>>> cheers
>>>   Paul
>>>
>>>> and following is orginal source until i was found in internet.
>>>>
>>>> from BeautifulSoup import BeautifulSoup
>>>> from PAM30 import PAMIE
>>>> url = 'http://www.cnn.com'
>>>> ie = PAMIE(url)
>>>> bs = BeautifulSoup(ie.pageText())
>>>>
>>>> if possible i really want to make it work together with beautifulsoup
>>>> or
>>>> lxml with PAMIE.
>>>> sorry my bad english.
>>>> thanks in advance.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Stefan Behnel-3 wrote:
>>>>> Hi,
>>>>>
>>>>> elca, 25.10.2009 02:35:
>>>>>> hello...
>>>>>> if anyone know..please help me !
>>>>>> i really want to know...i was searched in google lot of time.
>>>>>> but can't found clear soultion. and also because of my lack of python
>>>>>> knowledge.
>>>>>> i want to use IE.navigate function with beautifulsoup or lxml..
>>>>>> if anyone know about this  or sample.
>>>>>> please help me!
>>>>>> thanks in advance ..
>>>>> You wrote a message with nine lines, only one of which gives a tiny
>>>>> hint
>>>>> on
>>>>> what you actually want to do. What about providing an explanation of
>>>>> what
>>>>> you want to achieve instead? Try to answer questions like: Where does
>>>>> your
>>>>> data come from? Is it XML or HTML? What do you want to do with it?
>>>>>
>>>>> This might help:
>>>>>
>>>>> http://www.catb.org/~esr/faqs/smart-questions.html
>>>>>
>>>>> Stefan
>>>>> -- 
>>>>> http://mail.python.org/mailman/listinfo/python-list
>>>>>
>>>>>
>>> -- 
>>> http://mail.python.org/mailman/listinfo/python-list
>>>
>>>
>> 
> 
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 
> 


hello,
im sorry ,also im not familiar with newsgroup.
so this position is bottom-posting position? 
if wrong correct me..
thanks , in addition i was testing just before you sent 

text = PAMIE('http://www.naver.com').getPageText() 
i have some question...
how can i keep open only one windows? not open several windows.
following is my scenario.
after open www.cnn.com i want to go
http://www.cnn.com/2009/US/10/24/teen.jane.doe/index.html
with keep only one windows.

text = PAMIE('http://www.cnn.com').getPageText() 
sleep(5)
text = PAMIE('http://www.cnn.com/2009/US/10/24/teen.jane.doe/index.html')
thanks in advance :)


-- 
View this message in context: http://www.nabble.com/how-can-i-use-lxml-with-win32com--tp26044339p26046897.html
Sent from the Python - python-list mailing list archive at Nabble.com.




More information about the Python-list mailing list