Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Commit

Permalink
clean up logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jctanner committed Feb 3, 2019
1 parent c81fd20 commit 82c0664
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions scripts/scrape_github_issues_url
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 5,16 @@ import json
import logging
import os
from pprint import pprint
#from lib.utils.webscraper import GithubWebScraper
from ansibullbot.utils.webscraper import GithubWebScraper


def main():

logging.level = logging.DEBUG
logFormatter = \
logging.Formatter("%(asctime)s %(levelname)s %(message)s")
rootLogger = logging.getLogger()
rootLogger.setLevel(logging.DEBUG)

logfile = '/tmp/scraper.log'
fileHandler = logging.FileHandler("{0}/{1}".format(
os.path.dirname(logfile),
os.path.basename(logfile))
)
fileHandler.setFormatter(logFormatter)
rootLogger.addHandler(fileHandler)

parser = argparse.ArgumentParser()
parser.add_argument("url")
args = parser.parse_args()

gws = GithubWebScraper()
#summaries = gws.get_issue_summaries(None, baseurl=args.url)
summaries = gws.get_issue_summaries(args.url, baseurl=args.url)
print(json.dumps(sorted([int(x) for x in summaries.keys()])))

Expand Down

0 comments on commit 82c0664

Please sign in to comment.