<s> from html . parser import HTMLParser <EOL> def get_element_ids ( html ) : <EOL> ids = [ ] <EOL> class MyHTMLParser ( HTMLParser ) : <EOL> def handle_starttag ( self , tag , attrs ) : <EOL> for attr in attrs : <EOL> if attr [ <NUM_LIT:0> ] == '<STR_LIT:id>' : <EOL> ids . append ( attr [ <NUM_LIT:1> ] ) <EOL> parser = MyHTMLParser ( ) <EOL> parser . feed ( html ) <EOL> return ids </s>
