mirror of
https://github.com/leoncvlt/loconotion.git
synced 2024-08-30 18:12:12 +00:00
Fixed parsing
This commit is contained in:
parent
acb1f9b9a4
commit
8be7011f3f
@ -1,3 +1,4 @@
|
||||
from notionparser import Parser
|
||||
import os
|
||||
import sys
|
||||
import logging
|
||||
@ -11,11 +12,10 @@ try:
|
||||
import requests
|
||||
import toml
|
||||
except ModuleNotFoundError as error:
|
||||
log.critical(f"ModuleNotFoundError: {error}. have your installed the requirements?")
|
||||
log.critical(
|
||||
f"ModuleNotFoundError: {error}. have your installed the requirements?")
|
||||
sys.exit()
|
||||
|
||||
from notionparser import Parser
|
||||
|
||||
|
||||
def main():
|
||||
# set up argument parser
|
||||
@ -78,7 +78,8 @@ def main():
|
||||
log.addHandler(log_screen_handler)
|
||||
log.propagate = False
|
||||
try:
|
||||
import colorama, copy
|
||||
import colorama
|
||||
import copy
|
||||
|
||||
LOG_COLORS = {
|
||||
logging.DEBUG: colorama.Fore.GREEN,
|
||||
@ -117,7 +118,7 @@ def main():
|
||||
if urllib.parse.urlparse(args.target).scheme:
|
||||
try:
|
||||
response = requests.get(args.target)
|
||||
if "notion.so" in args.target:
|
||||
if "notion.so" in args.target or "notion.site" in args.target:
|
||||
log.info("Initialising parser with simple page url")
|
||||
config = {"page": args.target}
|
||||
Parser(config=config, args=vars(args))
|
||||
|
Loading…
Reference in New Issue
Block a user