Socialabel

Thursday, December 12, 2013

Parsing HTML, JSS, CSS, dan Quote Python

Kode parsing HTML JSS, CSS, dan Komentar

 def ParsingHtmlManual(finaltext):  
   finaltext=contohweb.split()  
   finaltext=' '.join(finaltext)  
   finaltext = re.sub(r'<script.*?/script>','', finaltext)  
   finaltext = re.sub('<style.*?/style>', '', finaltext)  
   finaltext = re.sub('<!--.*?-->', '', finaltext)  
   finaltext = re.sub('<.*?>', '', finaltext)  
   return finaltext  

Keyword:parsing, seo, html, jss, css, html

No comments:

Post a Comment