@DictScraper._needs_download<EOL><INDENT>def gender(self):<DEDENT>
elements = self.tree.xpath('<STR_LIT>')<EOL>if len(elements):<EOL><INDENT>elements = self.tree.xpath('<STR_LIT>')[<NUM_LIT:0>]<EOL>if len(elements):<EOL><INDENT>if '<STR_LIT>' in self.page.url:<EOL><INDENT>elements = elements.xpath('<STR_LIT>')<EOL><DEDENT>elif '<STR_LIT>' in self.page.url:<EOL><INDENT>elements = elements.xpath('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>return [None]<EOL><DEDENT>element = [element[<NUM_LIT:1>:] for element in elements if element in ['<STR_LIT>', '<STR_LIT>']]<EOL>counter = Counter(element)<EOL>if len(counter.most_common(<NUM_LIT:1>)):<EOL><INDENT>result = counter.most_common(<NUM_LIT:1>)[<NUM_LIT:0>][<NUM_LIT:0>]<EOL>return [result]<EOL><DEDENT><DEDENT><DEDENT>return [None]<EOL>
Tries to scrape the correct gender for a given word from wordreference.com