161 as a blank separated string |
161 as a blank separated string |
162 @rtype list of tuples of (str, str) |
162 @rtype list of tuples of (str, str) |
163 """ |
163 """ |
164 classes = [(t.name, " ".join(t["class"])) for t in |
164 classes = [(t.name, " ".join(t["class"])) for t in |
165 self.__soup.find_all(True, {"class": True})] |
165 self.__soup.find_all(True, {"class": True})] |
166 return sorted(list(set(classes))) |
166 return sorted(set(classes)) |
167 |
167 |
168 def __getIds(self): |
168 def __getIds(self): |
169 """ |
169 """ |
170 Private method to extract all IDs of the HTML text. |
170 Private method to extract all IDs of the HTML text. |
171 |
171 |
172 @return list of tuples containing the tag name and its ID |
172 @return list of tuples containing the tag name and its ID |
173 @rtype list of tuples of (str, str) |
173 @rtype list of tuples of (str, str) |
174 """ |
174 """ |
175 ids = [(t.name, t["id"]) for t in |
175 ids = [(t.name, t["id"]) for t in |
176 self.__soup.find_all(True, {"id": True})] |
176 self.__soup.find_all(True, {"id": True})] |
177 return sorted(list(set(ids))) |
177 return sorted(set(ids)) |