def open_recruitment(self, n=<NUM_LIT:1>):
logger.info("<STR_LIT>".format(n))<EOL>if self.is_in_progress:<EOL><INDENT>raise MTurkRecruiterException(<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>if self.hit_domain is None:<EOL><INDENT>raise MTurkRecruiterException("<STR_LIT>")<EOL><DEDENT>self.mturkservice.check_credentials()<EOL>if self.config.get("<STR_LIT>"):<EOL><INDENT>self._create_mturk_qualifications()<EOL><DEDENT>hit_request = {<EOL>"<STR_LIT>": n,<EOL>"<STR_LIT:title>": self.config.get("<STR_LIT:title>"),<EOL>"<STR_LIT:description>": self.config.get("<STR_LIT:description>"),<EOL>"<STR_LIT>": self._config_to_list("<STR_LIT>"),<EOL>"<STR_LIT>": self.config.get("<STR_LIT>"),<EOL>"<STR_LIT>": self.config.get("<STR_LIT>"),<EOL>"<STR_LIT>": self.config.get("<STR_LIT>"),<EOL>"<STR_LIT>": self.ad_url,<EOL>"<STR_LIT>": self.config.get("<STR_LIT>"),<EOL>"<STR_LIT>": self.config.get("<STR_LIT>"),<EOL>"<STR_LIT>": self.config.get("<STR_LIT>"),<EOL>"<STR_LIT>": self._config_to_list("<STR_LIT>"),<EOL>"<STR_LIT>": self.config.get("<STR_LIT:id>"),<EOL>}<EOL>hit_info = self.mturkservice.create_hit(**hit_request)<EOL>if self.config.get("<STR_LIT>") == "<STR_LIT>":<EOL><INDENT>lookup_url = (<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>else:<EOL><INDENT>lookup_url = "<STR_LIT>"<EOL><DEDENT>return {<EOL>"<STR_LIT>": [lookup_url.format(**hit_info)],<EOL>"<STR_LIT:message>": "<STR_LIT>",<EOL>}<EOL>
Open a connection to AWS MTurk and create a HIT.