Compare commits
No commits in common. "881fb6104b259cb377107163c1d2cec47f8b38d4" and "f9dec8a947c74f126c1e2c007df89448778e4b21" have entirely different histories.
881fb6104b
...
f9dec8a947
2 changed files with 5 additions and 13 deletions
|
@ -1,4 +0,0 @@
|
||||||
{
|
|
||||||
"user": "",
|
|
||||||
"password": ""
|
|
||||||
}
|
|
|
@ -15,10 +15,13 @@ default_categories = [
|
||||||
'Technology',
|
'Technology',
|
||||||
'Deployments',
|
'Deployments',
|
||||||
'Dataset',
|
'Dataset',
|
||||||
# 'City',
|
'City',
|
||||||
# 'Country',
|
'Country',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
username = "Ruben2@SemanticGraphFetcher"
|
||||||
|
password = "bdqjse4jodn34rbj73l0agrtb306v693"
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description='Turn wiki into nodes & links, usable by d3-force.')
|
parser = argparse.ArgumentParser(description='Turn wiki into nodes & links, usable by d3-force.')
|
||||||
parser.add_argument('--categories', metavar='categories', default=default_categories, nargs='+',
|
parser.add_argument('--categories', metavar='categories', default=default_categories, nargs='+',
|
||||||
help='Categories')
|
help='Categories')
|
||||||
|
@ -26,16 +29,9 @@ parser.add_argument('--url', default="https://www.securityvision.io/wiki/api.ph
|
||||||
help='Wiki API URL')
|
help='Wiki API URL')
|
||||||
parser.add_argument('--output', default="semantic_data.json",
|
parser.add_argument('--output', default="semantic_data.json",
|
||||||
help='Output JSON file')
|
help='Output JSON file')
|
||||||
parser.add_argument('--credentials', default="no_credentials.json",
|
|
||||||
help="JSON file containing the Bot's credentials")
|
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
with open(args.credentials) as fp:
|
|
||||||
credentials = json.load(fp)
|
|
||||||
username = credentials['user']
|
|
||||||
password = credentials['password']
|
|
||||||
|
|
||||||
|
|
||||||
def get_session():
|
def get_session():
|
||||||
S = requests.Session()
|
S = requests.Session()
|
||||||
|
|
Loading…
Reference in a new issue