Spaces:
Sleeping
Sleeping
Remove debug info
Browse files
beautiful_soup/beautiful_soup.py
CHANGED
|
@@ -91,67 +91,54 @@ def get_main_content( soup ):
|
|
| 91 |
|
| 92 |
content = soup.find( "div", { "class": "post-body" } )
|
| 93 |
if content is not None:
|
| 94 |
-
print('Has .post-body class.')
|
| 95 |
return content
|
| 96 |
|
| 97 |
content = soup.find( "div", { "class": "article-content" } )
|
| 98 |
if content is not None:
|
| 99 |
-
print('Has .article-content class.')
|
| 100 |
return content
|
| 101 |
|
| 102 |
content = soup.find( "div", { "class": "blog-post-content" } )
|
| 103 |
if content is not None:
|
| 104 |
-
print('Has .blog-post-content class.')
|
| 105 |
return content
|
| 106 |
|
| 107 |
content = soup.find( "div", { "class": "region-content" } )
|
| 108 |
if content is not None:
|
| 109 |
-
print('Has .region-content class.')
|
| 110 |
return content
|
| 111 |
|
| 112 |
content = soup.find( "div", { "class": "entry-content" } )
|
| 113 |
if content is not None:
|
| 114 |
-
print('Has .entry-content class.')
|
| 115 |
return content
|
| 116 |
|
| 117 |
content = soup.find( "div", { "class": "region--content" } )
|
| 118 |
if content is not None:
|
| 119 |
-
print('Has .region--content class.')
|
| 120 |
return content
|
| 121 |
|
| 122 |
content = soup.find( "div", { "class": "article" } )
|
| 123 |
if content is not None:
|
| 124 |
-
print('Has .article class.')
|
| 125 |
return content
|
| 126 |
|
| 127 |
content = soup.find( "div", { "class": "article-inner_html" } )
|
| 128 |
if content is not None:
|
| 129 |
-
print('Has .article-inner_html class.')
|
| 130 |
return content
|
| 131 |
|
| 132 |
content = soup.find( "div", { "id": "bmdDetail-Content" } )
|
| 133 |
if content is not None:
|
| 134 |
-
print('Has .bmdDetail-Content id.')
|
| 135 |
return content
|
| 136 |
|
| 137 |
content = soup.find( "div", { "id": "main" } )
|
| 138 |
if content is not None:
|
| 139 |
-
print('Has .bmdDetail-Content id.')
|
| 140 |
return content
|
| 141 |
|
| 142 |
content = soup.main
|
| 143 |
if content is not None:
|
| 144 |
-
print('Has main tag.')
|
| 145 |
return content
|
| 146 |
|
| 147 |
content = soup.find( "article" )
|
| 148 |
if content is not None:
|
| 149 |
-
print('Has article tag.')
|
| 150 |
return content
|
| 151 |
|
| 152 |
content = soup.find( "body" )
|
| 153 |
if content is not None:
|
| 154 |
-
print('Has body tag.')
|
| 155 |
return content
|
| 156 |
|
| 157 |
return None
|
|
|
|
| 91 |
|
| 92 |
content = soup.find( "div", { "class": "post-body" } )
|
| 93 |
if content is not None:
|
|
|
|
| 94 |
return content
|
| 95 |
|
| 96 |
content = soup.find( "div", { "class": "article-content" } )
|
| 97 |
if content is not None:
|
|
|
|
| 98 |
return content
|
| 99 |
|
| 100 |
content = soup.find( "div", { "class": "blog-post-content" } )
|
| 101 |
if content is not None:
|
|
|
|
| 102 |
return content
|
| 103 |
|
| 104 |
content = soup.find( "div", { "class": "region-content" } )
|
| 105 |
if content is not None:
|
|
|
|
| 106 |
return content
|
| 107 |
|
| 108 |
content = soup.find( "div", { "class": "entry-content" } )
|
| 109 |
if content is not None:
|
|
|
|
| 110 |
return content
|
| 111 |
|
| 112 |
content = soup.find( "div", { "class": "region--content" } )
|
| 113 |
if content is not None:
|
|
|
|
| 114 |
return content
|
| 115 |
|
| 116 |
content = soup.find( "div", { "class": "article" } )
|
| 117 |
if content is not None:
|
|
|
|
| 118 |
return content
|
| 119 |
|
| 120 |
content = soup.find( "div", { "class": "article-inner_html" } )
|
| 121 |
if content is not None:
|
|
|
|
| 122 |
return content
|
| 123 |
|
| 124 |
content = soup.find( "div", { "id": "bmdDetail-Content" } )
|
| 125 |
if content is not None:
|
|
|
|
| 126 |
return content
|
| 127 |
|
| 128 |
content = soup.find( "div", { "id": "main" } )
|
| 129 |
if content is not None:
|
|
|
|
| 130 |
return content
|
| 131 |
|
| 132 |
content = soup.main
|
| 133 |
if content is not None:
|
|
|
|
| 134 |
return content
|
| 135 |
|
| 136 |
content = soup.find( "article" )
|
| 137 |
if content is not None:
|
|
|
|
| 138 |
return content
|
| 139 |
|
| 140 |
content = soup.find( "body" )
|
| 141 |
if content is not None:
|
|
|
|
| 142 |
return content
|
| 143 |
|
| 144 |
return None
|