mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-12 22:25:44 -04:00
Remove unnecessary variable length args for dedupe
This commit is contained in:
parent
d74ddd42ae
commit
d8cf09c21e
8 changed files with 9 additions and 9 deletions
|
@ -57,7 +57,7 @@ def save_archive_dot_org(link: Link, out_dir: Optional[Path]=None, timeout: int=
|
||||||
]
|
]
|
||||||
cmd = [
|
cmd = [
|
||||||
CURL_BINARY,
|
CURL_BINARY,
|
||||||
*dedupe(*options),
|
*dedupe(options),
|
||||||
submit_url,
|
submit_url,
|
||||||
]
|
]
|
||||||
status = 'succeeded'
|
status = 'succeeded'
|
||||||
|
|
|
@ -50,7 +50,7 @@ def save_favicon(link: Link, out_dir: Optional[Path]=None, timeout: int=TIMEOUT)
|
||||||
]
|
]
|
||||||
cmd = [
|
cmd = [
|
||||||
CURL_BINARY,
|
CURL_BINARY,
|
||||||
*dedupe(*options),
|
*dedupe(options),
|
||||||
FAVICON_PROVIDER.format(domain(link.url)),
|
FAVICON_PROVIDER.format(domain(link.url)),
|
||||||
]
|
]
|
||||||
status = 'failed'
|
status = 'failed'
|
||||||
|
|
|
@ -53,7 +53,7 @@ def save_headers(link: Link, out_dir: Optional[str]=None, timeout: int=TIMEOUT)
|
||||||
]
|
]
|
||||||
cmd = [
|
cmd = [
|
||||||
CURL_BINARY,
|
CURL_BINARY,
|
||||||
*dedupe(*options),
|
*dedupe(options),
|
||||||
link.url,
|
link.url,
|
||||||
]
|
]
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -50,7 +50,7 @@ def save_media(link: Link, out_dir: Optional[Path]=None, timeout: int=MEDIA_TIME
|
||||||
]
|
]
|
||||||
cmd = [
|
cmd = [
|
||||||
YOUTUBEDL_BINARY,
|
YOUTUBEDL_BINARY,
|
||||||
*dedupe(*options),
|
*dedupe(options),
|
||||||
link.url,
|
link.url,
|
||||||
]
|
]
|
||||||
status = 'succeeded'
|
status = 'succeeded'
|
||||||
|
|
|
@ -57,7 +57,7 @@ def save_singlefile(link: Link, out_dir: Optional[Path]=None, timeout: int=TIMEO
|
||||||
]
|
]
|
||||||
cmd = [
|
cmd = [
|
||||||
DEPENDENCIES['SINGLEFILE_BINARY']['path'],
|
DEPENDENCIES['SINGLEFILE_BINARY']['path'],
|
||||||
*dedupe(*options),
|
*dedupe(options),
|
||||||
link.url,
|
link.url,
|
||||||
output,
|
output,
|
||||||
]
|
]
|
||||||
|
|
|
@ -114,7 +114,7 @@ def save_title(link: Link, out_dir: Optional[Path]=None, timeout: int=TIMEOUT) -
|
||||||
]
|
]
|
||||||
cmd = [
|
cmd = [
|
||||||
CURL_BINARY,
|
CURL_BINARY,
|
||||||
*dedupe(*options),
|
*dedupe(options),
|
||||||
link.url,
|
link.url,
|
||||||
]
|
]
|
||||||
status = 'succeeded'
|
status = 'succeeded'
|
||||||
|
|
|
@ -74,7 +74,7 @@ def save_wget(link: Link, out_dir: Optional[Path]=None, timeout: int=TIMEOUT) ->
|
||||||
]
|
]
|
||||||
cmd = [
|
cmd = [
|
||||||
WGET_BINARY,
|
WGET_BINARY,
|
||||||
*dedupe(*options),
|
*dedupe(options),
|
||||||
link.url,
|
link.url,
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -287,7 +287,7 @@ def chrome_args(**options) -> List[str]:
|
||||||
cmd_args.append('--user-data-dir={}'.format(options['CHROME_USER_DATA_DIR']))
|
cmd_args.append('--user-data-dir={}'.format(options['CHROME_USER_DATA_DIR']))
|
||||||
|
|
||||||
|
|
||||||
return dedupe(*cmd_args)
|
return dedupe(cmd_args)
|
||||||
|
|
||||||
def chrome_cleanup():
|
def chrome_cleanup():
|
||||||
"""
|
"""
|
||||||
|
@ -325,7 +325,7 @@ def ansi_to_html(text):
|
||||||
|
|
||||||
|
|
||||||
@enforce_types
|
@enforce_types
|
||||||
def dedupe(*options: str) -> List[str]:
|
def dedupe(options: List[str]) -> List[str]:
|
||||||
"""
|
"""
|
||||||
Deduplicates the given options. Options that come later clobber earlier
|
Deduplicates the given options. Options that come later clobber earlier
|
||||||
conflicting options.
|
conflicting options.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue