1
0
personal-data/personal_data/__main__.py

20 lines
574 B
Python
Raw Normal View History

2024-04-16 22:38:57 +00:00
import personal_data.main
2024-04-16 21:23:27 +00:00
import argparse
2024-04-16 22:45:15 +00:00
import logging
2024-04-16 21:23:27 +00:00
def parse_arguments():
parser = argparse.ArgumentParser()
parser.add_argument('fetchers', metavar='FETCHER', type=str, nargs='+')
2024-04-17 22:13:56 +00:00
parser.add_argument('--cookiejar', action = 'store_true')
2024-04-16 21:23:27 +00:00
return parser.parse_args()
def main():
2024-04-16 22:45:15 +00:00
logging.basicConfig()
logging.getLogger('personal_data').setLevel('INFO')
2024-04-16 21:23:27 +00:00
args = parse_arguments()
scraper_filter = frozenset(args.fetchers)
2024-04-17 22:13:56 +00:00
personal_data.main.main(scraper_filter, use_cookiejar = args.cookiejar)
2024-03-31 22:55:55 +00:00
2023-12-10 23:27:56 +00:00
if __name__ == '__main__':
2024-04-16 21:23:27 +00:00
main()