1
0
personal-data/personal_data/__main__.py
Jon Michael Aanes fdb6e2d180
Some checks failed
Build container / Package-Python (push) Failing after 25s
Build container / Package-Container (push) Successful in 1m30s
Cookiejar is configurable
2024-04-18 00:13:56 +02:00

20 lines
574 B
Python

import personal_data.main
import argparse
import logging
def parse_arguments():
parser = argparse.ArgumentParser()
parser.add_argument('fetchers', metavar='FETCHER', type=str, nargs='+')
parser.add_argument('--cookiejar', action = 'store_true')
return parser.parse_args()
def main():
logging.basicConfig()
logging.getLogger('personal_data').setLevel('INFO')
args = parse_arguments()
scraper_filter = frozenset(args.fetchers)
personal_data.main.main(scraper_filter, use_cookiejar = args.cookiejar)
if __name__ == '__main__':
main()