Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Beautiful Soup은 파이썬 3에서 사용하는 방법 없나요?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
주성  
View profile   Translate to Translated (View Original)
 More options Jul 27 2011, 10:24 pm
From: 주성 <maincas...@gmail.com>
Date: Wed, 27 Jul 2011 19:24:22 -0700 (PDT)
Local: Wed, Jul 27 2011 10:24 pm
Subject: Beautiful Soup은 파이썬 3에서 사용하는 방법 없나요?
2to3모듈 이용해서 바꿧는데두 에러가 나네요.

python3에서 Beautiful Soup 사용할 순 없나요?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
평면우주  
View profile   Translate to Translated (View Original)
 More options Jul 28 2011, 11:15 am
From: 평면우주 <milkelf.c...@gmail.com>
Date: Thu, 28 Jul 2011 08:15:32 -0700 (PDT)
Local: Thurs, Jul 28 2011 11:15 am
Subject: Re: Beautiful Soup은 파이썬 3에서 사용하는 방법 없나요?
안녕하세요.

python 3.2.1 에서 Beautiful soup 3.1.0 버젼 잘 동작하는 것을 확인 했습니다.
(HTML 파싱이 잘 되는지 테스트 했는데 정상적으로 파싱이 되는걸 확인 했습니다.)

2to3으로 python 3용으로 바꾸셨다고 하셨는데. 혹시 -w 옵션을 안 쓰신건 아닌가요?
-w 옵션이 없으면 변경해야 할 내용만 화면이 출력하지 파일을 변경하지 않습니다.

D:\project\test>c:\Python32\python.exe c:\Python32\Tools\Scripts
\2to3.py -w BeautifulSoup.py

이렇게 변경한 BeautifulSoup.py을 이용해
아래 코드를 실행 시켰을 때 정상 동작 했습니다.

from BeautifulSoup import BeautifulSoup

if __name__ == '__main__' :
   html = "<html><p>Para 1<p>Para 2<blockquote>Quote
1<blockquote>Quote 2"
   soup = BeautifulSoup(html)

   print (soup.prettify())

감사합니다.

혹시 그래도 안되면 아래 URL 참고해 보세요.

http://www.crummy.com/software/BeautifulSoup/3.1-problems.html

On Jul 28, 11:24 am, 주성 <maincas...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »