139 as a blank separated string |
139 as a blank separated string |
140 @rtype list of tuples of (str, str) |
140 @rtype list of tuples of (str, str) |
141 """ |
141 """ |
142 classes = [(t.name, " ".join(t["class"])) for t in |
142 classes = [(t.name, " ".join(t["class"])) for t in |
143 self.__soup.find_all(True, {"class": True})] |
143 self.__soup.find_all(True, {"class": True})] |
144 return sorted(list(set(classes))) |
144 return sorted(set(classes)) |
145 |
145 |
146 def __getIds(self): |
146 def __getIds(self): |
147 """ |
147 """ |
148 Private method to extract all IDs of the HTML text. |
148 Private method to extract all IDs of the HTML text. |
149 |
149 |
150 @return list of tuples containing the tag name and its ID |
150 @return list of tuples containing the tag name and its ID |
151 @rtype list of tuples of (str, str) |
151 @rtype list of tuples of (str, str) |
152 """ |
152 """ |
153 ids = [(t.name, t["id"]) for t in |
153 ids = [(t.name, t["id"]) for t in |
154 self.__soup.find_all(True, {"id": True})] |
154 self.__soup.find_all(True, {"id": True})] |
155 return sorted(list(set(ids))) |
155 return sorted(set(ids)) |