| 25 | self.downloader.download(self.stocks) |
| 26 | |
| 27 | def parse_args(): |
| 28 | parser = argparse.ArgumentParser(description='Download News') |
| 29 | parser.add_argument("--config", default=os.path.join(ROOT, "configs", "downloader", "tools", "fmp_sentiment_exp.py"), help="download datasets config file path") |
| 30 | parser.add_argument( |
| 31 | '--cfg-options', |
| 32 | nargs='+', |
| 33 | action=DictAction, |
| 34 | help='override some settings in the used config, the key-value pair ' |
| 35 | 'in xxx=yyy format will be merged into config file. If the value to ' |
| 36 | 'be overwritten is a list, it should be like key="[a,b]" or key=a,b ' |
| 37 | 'It also allows nested list/tuple values, e.g. key="[(a,b),(c,d)]" ' |
| 38 | 'Note that the quotation marks are necessary and that no white space ' |
| 39 | 'is allowed.') |
| 40 | parser.add_argument("--root", type=str, default=ROOT) |
| 41 | parser.add_argument("--workdir", type=str, default="workdir") |
| 42 | parser.add_argument("--tag", type=str, default=None) |
| 43 | parser.add_argument("--if_remove", action="store_true", default=False) |
| 44 | args = parser.parse_args() |
| 45 | return args |
| 46 | |
| 47 | def main(): |
| 48 | args = parse_args() |