mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-09 12:21:57 -04:00
move config into dedicated global app
This commit is contained in:
parent
ee7f73bd7b
commit
3e5b6ddeae
79 changed files with 494 additions and 525 deletions
|
@ -10,7 +10,7 @@ from datetime import datetime, timezone
|
|||
|
||||
from django.db.models import QuerySet
|
||||
|
||||
from ..config import (
|
||||
from ..config.legacy import (
|
||||
SAVE_ALLOWLIST_PTN,
|
||||
SAVE_DENYLIST_PTN,
|
||||
)
|
||||
|
|
|
@ -12,7 +12,7 @@ from ..util import (
|
|||
is_static_file,
|
||||
dedupe,
|
||||
)
|
||||
from ..config import (
|
||||
from ..config.legacy import (
|
||||
TIMEOUT,
|
||||
CURL_ARGS,
|
||||
CURL_EXTRA_ARGS,
|
||||
|
@ -24,6 +24,7 @@ from ..config import (
|
|||
)
|
||||
from ..logging_util import TimedProgress
|
||||
|
||||
|
||||
def get_output_path():
|
||||
return 'archive.org.txt'
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ from ..util import (
|
|||
domain,
|
||||
dedupe,
|
||||
)
|
||||
from ..config import CONFIG
|
||||
from ..config.legacy import CONFIG
|
||||
from ..logging_util import TimedProgress
|
||||
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ from ..util import (
|
|||
without_query,
|
||||
without_fragment,
|
||||
)
|
||||
from ..config import CONFIG
|
||||
from ..config.legacy import CONFIG
|
||||
from ..logging_util import TimedProgress
|
||||
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ from ..util import (
|
|||
get_headers,
|
||||
dedupe,
|
||||
)
|
||||
from ..config import (
|
||||
from ..config.legacy import (
|
||||
TIMEOUT,
|
||||
CURL_BINARY,
|
||||
CURL_ARGS,
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
__package__ = 'archivebox.extractors'
|
||||
|
||||
import archivebox
|
||||
|
||||
from html.parser import HTMLParser
|
||||
import io
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
|
||||
from ..config import (
|
||||
from archivebox.config import VERSION
|
||||
from ..config.legacy import (
|
||||
SAVE_HTMLTOTEXT,
|
||||
TIMEOUT,
|
||||
)
|
||||
|
@ -154,7 +153,7 @@ def save_htmltotext(link: Link, out_dir: Optional[Path]=None, timeout: int=TIMEO
|
|||
return ArchiveResult(
|
||||
cmd=cmd,
|
||||
pwd=str(out_dir),
|
||||
cmd_version=archivebox.__version__,
|
||||
cmd_version=VERSION,
|
||||
output=output,
|
||||
status=status,
|
||||
index_texts=[extracted_text] if extracted_text else [],
|
||||
|
|
|
@ -13,7 +13,7 @@ from ..util import (
|
|||
is_static_file,
|
||||
dedupe,
|
||||
)
|
||||
from ..config import (
|
||||
from ..config.legacy import (
|
||||
TIMEOUT,
|
||||
SAVE_MERCURY,
|
||||
DEPENDENCIES,
|
||||
|
|
|
@ -12,7 +12,7 @@ from ..util import (
|
|||
htmldecode,
|
||||
dedupe,
|
||||
)
|
||||
from ..config import (
|
||||
from ..config.legacy import (
|
||||
TIMEOUT,
|
||||
CHECK_SSL_VALIDITY,
|
||||
SAVE_TITLE,
|
||||
|
|
|
@ -17,7 +17,7 @@ from ..util import (
|
|||
urldecode,
|
||||
dedupe,
|
||||
)
|
||||
from ..config import (
|
||||
from ..config.legacy import (
|
||||
WGET_ARGS,
|
||||
WGET_EXTRA_ARGS,
|
||||
TIMEOUT,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue