diff --git a/iyp/crawlers/alice_lg/amsix.py b/iyp/crawlers/alice_lg/amsix.py index 6e74b62..4a0c1fc 100644 --- a/iyp/crawlers/alice_lg/amsix.py +++ b/iyp/crawlers/alice_lg/amsix.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from iyp.crawlers.alice_lg import Crawler @@ -15,11 +14,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/alice_lg/bcix.py b/iyp/crawlers/alice_lg/bcix.py index ed1a6f7..66d121e 100644 --- a/iyp/crawlers/alice_lg/bcix.py +++ b/iyp/crawlers/alice_lg/bcix.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from iyp.crawlers.alice_lg import Crawler @@ -15,11 +14,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/alice_lg/decix.py b/iyp/crawlers/alice_lg/decix.py index d3c8c35..fdb92c0 100644 --- a/iyp/crawlers/alice_lg/decix.py +++ b/iyp/crawlers/alice_lg/decix.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from iyp.crawlers.alice_lg import Crawler @@ -15,11 +14,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/alice_lg/ixbr.py b/iyp/crawlers/alice_lg/ixbr.py index 691e6e4..a57ce21 100644 --- a/iyp/crawlers/alice_lg/ixbr.py +++ b/iyp/crawlers/alice_lg/ixbr.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from iyp.crawlers.alice_lg import Crawler @@ -15,11 +14,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/alice_lg/linx.py b/iyp/crawlers/alice_lg/linx.py index 223635c..ca32ed1 100644 --- a/iyp/crawlers/alice_lg/linx.py +++ b/iyp/crawlers/alice_lg/linx.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from iyp.crawlers.alice_lg import Crawler @@ -15,11 +14,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/alice_lg/megaport.py b/iyp/crawlers/alice_lg/megaport.py index 5156a21..42e58cf 100644 --- a/iyp/crawlers/alice_lg/megaport.py +++ b/iyp/crawlers/alice_lg/megaport.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from iyp.crawlers.alice_lg import Crawler @@ -15,11 +14,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/alice_lg/netnod.py b/iyp/crawlers/alice_lg/netnod.py index 5f711a4..e8e3add 100644 --- a/iyp/crawlers/alice_lg/netnod.py +++ b/iyp/crawlers/alice_lg/netnod.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from iyp.crawlers.alice_lg import Crawler @@ -15,11 +14,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/apnic/eyeball.py b/iyp/crawlers/apnic/eyeball.py index c5b275a..6d8172b 100644 --- a/iyp/crawlers/apnic/eyeball.py +++ b/iyp/crawlers/apnic/eyeball.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys import iso3166 @@ -94,11 +93,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/bgpkit/as2rel_v4.py b/iyp/crawlers/bgpkit/as2rel_v4.py index 2278dd0..27d77d9 100644 --- a/iyp/crawlers/bgpkit/as2rel_v4.py +++ b/iyp/crawlers/bgpkit/as2rel_v4.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from iyp.crawlers.bgpkit import AS2RelCrawler @@ -22,11 +21,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/bgpkit/as2rel_v6.py b/iyp/crawlers/bgpkit/as2rel_v6.py index e7807c7..5e2c1aa 100644 --- a/iyp/crawlers/bgpkit/as2rel_v6.py +++ b/iyp/crawlers/bgpkit/as2rel_v6.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from iyp.crawlers.bgpkit import AS2RelCrawler @@ -22,11 +21,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/bgpkit/peerstats.py b/iyp/crawlers/bgpkit/peerstats.py index 7724186..d27a993 100644 --- a/iyp/crawlers/bgpkit/peerstats.py +++ b/iyp/crawlers/bgpkit/peerstats.py @@ -2,7 +2,6 @@ import bz2 import json import logging -import os import sys from datetime import datetime, time, timedelta, timezone @@ -99,11 +98,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/bgpkit/pfx2asn.py b/iyp/crawlers/bgpkit/pfx2asn.py index f9c85ac..d8ca502 100644 --- a/iyp/crawlers/bgpkit/pfx2asn.py +++ b/iyp/crawlers/bgpkit/pfx2asn.py @@ -2,7 +2,6 @@ import bz2 import json import logging -import os import sys from ipaddress import ip_network @@ -69,11 +68,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/bgptools/anycast_prefixes.py b/iyp/crawlers/bgptools/anycast_prefixes.py index e57589f..6828853 100644 --- a/iyp/crawlers/bgptools/anycast_prefixes.py +++ b/iyp/crawlers/bgptools/anycast_prefixes.py @@ -109,11 +109,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/bgptools/as_names.py b/iyp/crawlers/bgptools/as_names.py index bbfa957..c20630e 100644 --- a/iyp/crawlers/bgptools/as_names.py +++ b/iyp/crawlers/bgptools/as_names.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from io import BytesIO @@ -94,11 +93,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/bgptools/tags.py b/iyp/crawlers/bgptools/tags.py index a1e6525..a009a3a 100644 --- a/iyp/crawlers/bgptools/tags.py +++ b/iyp/crawlers/bgptools/tags.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from datetime import datetime, time, timezone @@ -86,11 +85,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/caida/as_relationships_v4.py b/iyp/crawlers/caida/as_relationships_v4.py index d9146bc..54820b1 100644 --- a/iyp/crawlers/caida/as_relationships_v4.py +++ b/iyp/crawlers/caida/as_relationships_v4.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from iyp.crawlers.caida import ASRelCrawler @@ -20,11 +19,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/caida/as_relationships_v6.py b/iyp/crawlers/caida/as_relationships_v6.py index df954bd..5829fff 100644 --- a/iyp/crawlers/caida/as_relationships_v6.py +++ b/iyp/crawlers/caida/as_relationships_v6.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from iyp.crawlers.caida import ASRelCrawler @@ -20,11 +19,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/caida/asrank.py b/iyp/crawlers/caida/asrank.py index d9e9cd2..aa90373 100644 --- a/iyp/crawlers/caida/asrank.py +++ b/iyp/crawlers/caida/asrank.py @@ -1,7 +1,6 @@ import argparse import json import logging -import os import sys from datetime import datetime, timezone @@ -115,11 +114,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/caida/ix_asns.py b/iyp/crawlers/caida/ix_asns.py index 82b3f9a..a517f5c 100644 --- a/iyp/crawlers/caida/ix_asns.py +++ b/iyp/crawlers/caida/ix_asns.py @@ -1,7 +1,6 @@ import argparse import json import logging -import os import sys from datetime import datetime, timezone @@ -99,11 +98,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/caida/ixs.py b/iyp/crawlers/caida/ixs.py index e9b4542..ebd279c 100644 --- a/iyp/crawlers/caida/ixs.py +++ b/iyp/crawlers/caida/ixs.py @@ -2,7 +2,6 @@ import ipaddress import json import logging -import os import sys from datetime import datetime, timezone @@ -209,11 +208,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/cisco/umbrella_top1m.py b/iyp/crawlers/cisco/umbrella_top1m.py index fe99a6f..9ee9d2f 100644 --- a/iyp/crawlers/cisco/umbrella_top1m.py +++ b/iyp/crawlers/cisco/umbrella_top1m.py @@ -1,7 +1,6 @@ import argparse import io import logging -import os import sys from datetime import datetime, timedelta, timezone from zipfile import ZipFile @@ -128,11 +127,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/citizenlab/urldb.py b/iyp/crawlers/citizenlab/urldb.py index 6893570..d92cbdc 100644 --- a/iyp/crawlers/citizenlab/urldb.py +++ b/iyp/crawlers/citizenlab/urldb.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from urllib.error import HTTPError @@ -79,11 +78,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/cloudflare/dns_top_ases.py b/iyp/crawlers/cloudflare/dns_top_ases.py index fe6b6e1..3a354d9 100644 --- a/iyp/crawlers/cloudflare/dns_top_ases.py +++ b/iyp/crawlers/cloudflare/dns_top_ases.py @@ -5,7 +5,6 @@ import argparse import logging -import os import sys import flatdict @@ -57,11 +56,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/cloudflare/dns_top_locations.py b/iyp/crawlers/cloudflare/dns_top_locations.py index c76985f..998b0ed 100644 --- a/iyp/crawlers/cloudflare/dns_top_locations.py +++ b/iyp/crawlers/cloudflare/dns_top_locations.py @@ -174,11 +174,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/cloudflare/ranking_bucket.py b/iyp/crawlers/cloudflare/ranking_bucket.py index 74a2b7d..9fdfe72 100644 --- a/iyp/crawlers/cloudflare/ranking_bucket.py +++ b/iyp/crawlers/cloudflare/ranking_bucket.py @@ -128,11 +128,10 @@ def unit_test(self): parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(processName)s %(message)s' logging.basicConfig( format=FORMAT, - filename=f'log/{scriptname}.log', + filename=f'log/{NAME}.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/cloudflare/top100.py b/iyp/crawlers/cloudflare/top100.py index afcfb36..03ae08e 100644 --- a/iyp/crawlers/cloudflare/top100.py +++ b/iyp/crawlers/cloudflare/top100.py @@ -79,11 +79,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/emileaben/as_names.py b/iyp/crawlers/emileaben/as_names.py index 197253e..3f13056 100644 --- a/iyp/crawlers/emileaben/as_names.py +++ b/iyp/crawlers/emileaben/as_names.py @@ -75,11 +75,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/example/crawler.py b/iyp/crawlers/example/crawler.py index 7708c7d..93be558 100644 --- a/iyp/crawlers/example/crawler.py +++ b/iyp/crawlers/example/crawler.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from datetime import datetime, timezone @@ -86,11 +85,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/google/crux_top1m_country.py b/iyp/crawlers/google/crux_top1m_country.py index 07a45f6..c591ae4 100644 --- a/iyp/crawlers/google/crux_top1m_country.py +++ b/iyp/crawlers/google/crux_top1m_country.py @@ -119,11 +119,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/iana/root_zone.py b/iyp/crawlers/iana/root_zone.py index cabea1f..e356ad4 100644 --- a/iyp/crawlers/iana/root_zone.py +++ b/iyp/crawlers/iana/root_zone.py @@ -1,7 +1,6 @@ import argparse import ipaddress import logging -import os import sys import requests @@ -111,11 +110,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/ihr/country_dependency.py b/iyp/crawlers/ihr/country_dependency.py index 81936b4..f72c1db 100644 --- a/iyp/crawlers/ihr/country_dependency.py +++ b/iyp/crawlers/ihr/country_dependency.py @@ -1,7 +1,6 @@ import argparse import json import logging -import os import sys from datetime import datetime, timezone @@ -124,11 +123,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/ihr/local_hegemony_v4.py b/iyp/crawlers/ihr/local_hegemony_v4.py index 3438dcc..2ada5e8 100644 --- a/iyp/crawlers/ihr/local_hegemony_v4.py +++ b/iyp/crawlers/ihr/local_hegemony_v4.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from iyp.crawlers.ihr import HegemonyCrawler @@ -21,11 +20,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/ihr/local_hegemony_v6.py b/iyp/crawlers/ihr/local_hegemony_v6.py index c86b4ce..fefc6d3 100644 --- a/iyp/crawlers/ihr/local_hegemony_v6.py +++ b/iyp/crawlers/ihr/local_hegemony_v6.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from iyp.crawlers.ihr import HegemonyCrawler @@ -21,11 +20,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/ihr/rov.py b/iyp/crawlers/ihr/rov.py index 3c40d46..6b46169 100644 --- a/iyp/crawlers/ihr/rov.py +++ b/iyp/crawlers/ihr/rov.py @@ -2,7 +2,6 @@ import csv import io import logging -import os import sys from datetime import datetime, timedelta, timezone from ipaddress import ip_network @@ -159,11 +158,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/inetintel/as_org.py b/iyp/crawlers/inetintel/as_org.py index 85dfd33..190e5cc 100644 --- a/iyp/crawlers/inetintel/as_org.py +++ b/iyp/crawlers/inetintel/as_org.py @@ -194,11 +194,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/manrs/members.py b/iyp/crawlers/manrs/members.py index 6ad7a8f..4adbf5a 100644 --- a/iyp/crawlers/manrs/members.py +++ b/iyp/crawlers/manrs/members.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from datetime import datetime, time, timezone @@ -135,11 +134,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/nro/delegated_stats.py b/iyp/crawlers/nro/delegated_stats.py index c8f5514..5ff4235 100644 --- a/iyp/crawlers/nro/delegated_stats.py +++ b/iyp/crawlers/nro/delegated_stats.py @@ -1,7 +1,6 @@ import argparse import logging import math -import os import sys from collections import defaultdict from datetime import datetime, timezone @@ -206,11 +205,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/ooni/facebookmessenger.py b/iyp/crawlers/ooni/facebookmessenger.py index 3afdaba..cf05afb 100644 --- a/iyp/crawlers/ooni/facebookmessenger.py +++ b/iyp/crawlers/ooni/facebookmessenger.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from collections import defaultdict @@ -80,11 +79,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S', ) diff --git a/iyp/crawlers/ooni/httpheaderfieldmanipulation.py b/iyp/crawlers/ooni/httpheaderfieldmanipulation.py index c7f79e9..df55669 100644 --- a/iyp/crawlers/ooni/httpheaderfieldmanipulation.py +++ b/iyp/crawlers/ooni/httpheaderfieldmanipulation.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from collections import defaultdict @@ -128,11 +127,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S', ) diff --git a/iyp/crawlers/ooni/httpinvalidrequestline.py b/iyp/crawlers/ooni/httpinvalidrequestline.py index 7f2f229..a2856ef 100644 --- a/iyp/crawlers/ooni/httpinvalidrequestline.py +++ b/iyp/crawlers/ooni/httpinvalidrequestline.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from collections import defaultdict @@ -71,11 +70,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S', ) diff --git a/iyp/crawlers/ooni/osignal.py b/iyp/crawlers/ooni/osignal.py index eeb80c7..3b2b663 100644 --- a/iyp/crawlers/ooni/osignal.py +++ b/iyp/crawlers/ooni/osignal.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from collections import defaultdict @@ -75,11 +74,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S', ) diff --git a/iyp/crawlers/ooni/psiphon.py b/iyp/crawlers/ooni/psiphon.py index 0a20fb2..aa614d5 100644 --- a/iyp/crawlers/ooni/psiphon.py +++ b/iyp/crawlers/ooni/psiphon.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from collections import defaultdict @@ -90,11 +89,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S', ) diff --git a/iyp/crawlers/ooni/riseupvpn.py b/iyp/crawlers/ooni/riseupvpn.py index 1f51049..d6af611 100644 --- a/iyp/crawlers/ooni/riseupvpn.py +++ b/iyp/crawlers/ooni/riseupvpn.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from collections import defaultdict @@ -77,11 +76,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S', ) diff --git a/iyp/crawlers/ooni/stunreachability.py b/iyp/crawlers/ooni/stunreachability.py index bfd8b76..a633f1b 100644 --- a/iyp/crawlers/ooni/stunreachability.py +++ b/iyp/crawlers/ooni/stunreachability.py @@ -1,7 +1,6 @@ import argparse import ipaddress import logging -import os import sys from collections import defaultdict @@ -134,11 +133,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S', ) diff --git a/iyp/crawlers/ooni/telegram.py b/iyp/crawlers/ooni/telegram.py index 8e2b4c5..0f60167 100644 --- a/iyp/crawlers/ooni/telegram.py +++ b/iyp/crawlers/ooni/telegram.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from collections import defaultdict @@ -109,11 +108,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S', ) diff --git a/iyp/crawlers/ooni/tor.py b/iyp/crawlers/ooni/tor.py index 4dd80cf..0cff6f1 100644 --- a/iyp/crawlers/ooni/tor.py +++ b/iyp/crawlers/ooni/tor.py @@ -1,7 +1,6 @@ import argparse import ipaddress import logging -import os import sys from collections import defaultdict @@ -115,11 +114,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S', ) diff --git a/iyp/crawlers/ooni/torsf.py b/iyp/crawlers/ooni/torsf.py index 0fd2985..621eca4 100644 --- a/iyp/crawlers/ooni/torsf.py +++ b/iyp/crawlers/ooni/torsf.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from collections import defaultdict @@ -73,11 +72,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S', ) diff --git a/iyp/crawlers/ooni/vanillator.py b/iyp/crawlers/ooni/vanillator.py index a141953..e4bbfae 100644 --- a/iyp/crawlers/ooni/vanillator.py +++ b/iyp/crawlers/ooni/vanillator.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from collections import defaultdict @@ -70,11 +69,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S', ) diff --git a/iyp/crawlers/ooni/webconnectivity.py b/iyp/crawlers/ooni/webconnectivity.py index 9ca56ce..f324706 100644 --- a/iyp/crawlers/ooni/webconnectivity.py +++ b/iyp/crawlers/ooni/webconnectivity.py @@ -1,7 +1,6 @@ import argparse import ipaddress import logging -import os import sys from collections import defaultdict from urllib.parse import urlparse @@ -161,11 +160,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S', ) diff --git a/iyp/crawlers/ooni/whatsapp.py b/iyp/crawlers/ooni/whatsapp.py index 5c6342a..29eade8 100644 --- a/iyp/crawlers/ooni/whatsapp.py +++ b/iyp/crawlers/ooni/whatsapp.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from collections import defaultdict @@ -103,11 +102,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S', ) diff --git a/iyp/crawlers/openintel/dnsgraph_jp.py b/iyp/crawlers/openintel/dnsgraph_jp.py index 30dd210..97a87cb 100644 --- a/iyp/crawlers/openintel/dnsgraph_jp.py +++ b/iyp/crawlers/openintel/dnsgraph_jp.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from iyp.crawlers.openintel import DnsgraphCrawler @@ -20,11 +19,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/openintel/dnsgraph_nl.py b/iyp/crawlers/openintel/dnsgraph_nl.py index 7b29c3b..322f4d0 100644 --- a/iyp/crawlers/openintel/dnsgraph_nl.py +++ b/iyp/crawlers/openintel/dnsgraph_nl.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from iyp.crawlers.openintel import DnsgraphCrawler @@ -20,11 +19,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/openintel/dnsgraph_rdns.py b/iyp/crawlers/openintel/dnsgraph_rdns.py index a9730b4..2631717 100644 --- a/iyp/crawlers/openintel/dnsgraph_rdns.py +++ b/iyp/crawlers/openintel/dnsgraph_rdns.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from iyp.crawlers.openintel import DnsgraphCrawler @@ -20,11 +19,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/openintel/infra_mx.py b/iyp/crawlers/openintel/infra_mx.py index 4c33f94..fff465e 100644 --- a/iyp/crawlers/openintel/infra_mx.py +++ b/iyp/crawlers/openintel/infra_mx.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from iyp.crawlers.openintel import OpenIntelCrawler @@ -29,11 +28,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/openintel/infra_ns.py b/iyp/crawlers/openintel/infra_ns.py index 91dfb8d..9e43c65 100644 --- a/iyp/crawlers/openintel/infra_ns.py +++ b/iyp/crawlers/openintel/infra_ns.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from iyp.crawlers.openintel import OpenIntelCrawler @@ -22,11 +21,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/openintel/tranco1m.py b/iyp/crawlers/openintel/tranco1m.py index d459d63..237b9c2 100644 --- a/iyp/crawlers/openintel/tranco1m.py +++ b/iyp/crawlers/openintel/tranco1m.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from iyp.crawlers.openintel import OpenIntelCrawler @@ -22,11 +21,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/openintel/umbrella1m.py b/iyp/crawlers/openintel/umbrella1m.py index 9b3ccde..50f28b7 100644 --- a/iyp/crawlers/openintel/umbrella1m.py +++ b/iyp/crawlers/openintel/umbrella1m.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from iyp.crawlers.openintel import OpenIntelCrawler @@ -22,11 +21,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/pch/daily_routing_snapshots_v4.py b/iyp/crawlers/pch/daily_routing_snapshots_v4.py index 649ee5e..147b6b4 100644 --- a/iyp/crawlers/pch/daily_routing_snapshots_v4.py +++ b/iyp/crawlers/pch/daily_routing_snapshots_v4.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from iyp.crawlers.pch import RoutingSnapshotCrawler @@ -21,11 +20,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/pch/daily_routing_snapshots_v6.py b/iyp/crawlers/pch/daily_routing_snapshots_v6.py index 3915769..11b1120 100644 --- a/iyp/crawlers/pch/daily_routing_snapshots_v6.py +++ b/iyp/crawlers/pch/daily_routing_snapshots_v6.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from iyp.crawlers.pch import RoutingSnapshotCrawler @@ -21,11 +20,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/peeringdb/fac.py b/iyp/crawlers/peeringdb/fac.py index 170187f..143d6bb 100644 --- a/iyp/crawlers/peeringdb/fac.py +++ b/iyp/crawlers/peeringdb/fac.py @@ -139,11 +139,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/peeringdb/ix.py b/iyp/crawlers/peeringdb/ix.py index ac9fdc1..7cb5e9e 100644 --- a/iyp/crawlers/peeringdb/ix.py +++ b/iyp/crawlers/peeringdb/ix.py @@ -400,11 +400,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/peeringdb/org.py b/iyp/crawlers/peeringdb/org.py index 7e429a4..f6b77e1 100644 --- a/iyp/crawlers/peeringdb/org.py +++ b/iyp/crawlers/peeringdb/org.py @@ -127,11 +127,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/ripe/as_names.py b/iyp/crawlers/ripe/as_names.py index 44e1efb..9b22dc3 100644 --- a/iyp/crawlers/ripe/as_names.py +++ b/iyp/crawlers/ripe/as_names.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys import requests @@ -78,11 +77,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/ripe/atlas_measurements.py b/iyp/crawlers/ripe/atlas_measurements.py index bb2f576..4746deb 100644 --- a/iyp/crawlers/ripe/atlas_measurements.py +++ b/iyp/crawlers/ripe/atlas_measurements.py @@ -2,7 +2,6 @@ import ipaddress import json import logging -import os import sys import flatdict @@ -257,11 +256,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/ripe/atlas_probes.py b/iyp/crawlers/ripe/atlas_probes.py index de96d19..78d14c2 100644 --- a/iyp/crawlers/ripe/atlas_probes.py +++ b/iyp/crawlers/ripe/atlas_probes.py @@ -2,7 +2,6 @@ import ipaddress import json import logging -import os import sys import flatdict @@ -182,11 +181,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/ripe/roa.py b/iyp/crawlers/ripe/roa.py index c66d1a7..71faa24 100644 --- a/iyp/crawlers/ripe/roa.py +++ b/iyp/crawlers/ripe/roa.py @@ -1,7 +1,6 @@ import argparse import logging import lzma -import os import sys from collections import defaultdict from datetime import datetime, timedelta, timezone @@ -109,11 +108,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/simulamet/rirdata_rdns.py b/iyp/crawlers/simulamet/rirdata_rdns.py index c226898..66c7475 100644 --- a/iyp/crawlers/simulamet/rirdata_rdns.py +++ b/iyp/crawlers/simulamet/rirdata_rdns.py @@ -132,11 +132,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/stanford/asdb.py b/iyp/crawlers/stanford/asdb.py index 133b623..b479889 100644 --- a/iyp/crawlers/stanford/asdb.py +++ b/iyp/crawlers/stanford/asdb.py @@ -1,7 +1,6 @@ import argparse import csv import logging -import os import re import sys from datetime import datetime, timezone @@ -135,11 +134,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/tranco/top1m.py b/iyp/crawlers/tranco/top1m.py index cb9b71d..d448a31 100644 --- a/iyp/crawlers/tranco/top1m.py +++ b/iyp/crawlers/tranco/top1m.py @@ -1,7 +1,6 @@ import argparse import io import logging -import os import sys from zipfile import ZipFile @@ -74,11 +73,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/virginiatech/rovista.py b/iyp/crawlers/virginiatech/rovista.py index 08180ed..901168c 100644 --- a/iyp/crawlers/virginiatech/rovista.py +++ b/iyp/crawlers/virginiatech/rovista.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from datetime import datetime, timezone @@ -82,11 +81,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/crawlers/worldbank/country_pop.py b/iyp/crawlers/worldbank/country_pop.py index ffca9f1..1e43926 100644 --- a/iyp/crawlers/worldbank/country_pop.py +++ b/iyp/crawlers/worldbank/country_pop.py @@ -1,7 +1,6 @@ import argparse import json import logging -import os import sys from datetime import datetime, timezone @@ -73,11 +72,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/post/address_family.py b/iyp/post/address_family.py index 9b78758..0c5d090 100644 --- a/iyp/post/address_family.py +++ b/iyp/post/address_family.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from iyp import BasePostProcess @@ -29,11 +28,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/post/clean_links.py b/iyp/post/clean_links.py index f255bd3..7c511bd 100644 --- a/iyp/post/clean_links.py +++ b/iyp/post/clean_links.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys from iyp import BasePostProcess @@ -89,11 +88,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S', ) diff --git a/iyp/post/country_information.py b/iyp/post/country_information.py index e82c36f..b9362a5 100644 --- a/iyp/post/country_information.py +++ b/iyp/post/country_information.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys import iso3166 @@ -42,11 +41,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/post/ip2prefix.py b/iyp/post/ip2prefix.py index f75a4bb..1783023 100644 --- a/iyp/post/ip2prefix.py +++ b/iyp/post/ip2prefix.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys import radix @@ -85,11 +84,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' ) diff --git a/iyp/post/url2hostname.py b/iyp/post/url2hostname.py index 52eb400..fe74f56 100644 --- a/iyp/post/url2hostname.py +++ b/iyp/post/url2hostname.py @@ -1,6 +1,5 @@ import argparse import logging -import os import sys import tldextract @@ -48,11 +47,10 @@ def main() -> None: parser.add_argument('--unit-test', action='store_true') args = parser.parse_args() - scriptname = os.path.basename(sys.argv[0]).replace('/', '_')[0:-3] FORMAT = '%(asctime)s %(levelname)s %(message)s' logging.basicConfig( format=FORMAT, - filename='log/' + scriptname + '.log', + filename='log/' + NAME + '.log', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S' )