2009-11-07 8 views
1

나는 중복을 피하기 위해 웹 페이지에서 md5 알고리즘을 사용하려고합니다. beautifulsoup의 결과를 md5가 소화 가능한 문자열로 변환하는 쉬운 방법이 있습니까?BeautifulSoup 결과에 md5 사용

많은 감사

답변

4

그냥 str와 문자열로 돌려 :

from BeautifulSoup import BeautifulSoup 
doc = "<html><h1>Heading</h1><p>Text" 
soup = BeautifulSoup(doc) 

str(soup) 

(the docs에서)

관련 문제