-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warn on broken steps, use yt-dlp to avoid youtube-dl errors, and don't crash on bad UTF-8 #1026
Changes from all commits
e41f313
f5f7aff
dba423a
b864c38
983f485
daef48e
081a12b
4ce3928
caa8b78
f729bbe
30947ae
a26a91d
07de4a7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,3 +24,6 @@ data1/ | |
data2/ | ||
data3/ | ||
output/ | ||
|
||
# vim | ||
*.sw? |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
__package__ = 'archivebox.extractors' | ||
|
||
import os | ||
import sys | ||
from pathlib import Path | ||
|
||
from typing import Optional, List, Iterable, Union | ||
|
@@ -137,14 +138,16 @@ def archive_link(link: Link, overwrite: bool=False, methods: Optional[Iterable[s | |
link.url, | ||
)) from e | ||
""" | ||
# Instead, use the kludgy workaround from | ||
# Instead, use the kludgy workaround from | ||
# https://github.com/ArchiveBox/ArchiveBox/issues/984#issuecomment-1150541627 | ||
with open(ERROR_LOG, "a", encoding='utf-8') as f: | ||
command = ' '.join(sys.argv) | ||
ts = datetime.now(timezone.utc).strftime('%Y-%m-%d__%H:%M:%S') | ||
f.write(("\n" + 'Exception in archive_methods.save_{}(Link(url={}))'.format( | ||
f.write(("\n" + 'Exception in archive_methods.save_{}(Link(url={})) command={}; ts={}'.format( | ||
method_name, | ||
link.url, | ||
command, | ||
ts | ||
) + "\n")) | ||
#f.write(f"\n> {command}; ts={ts} version={config['VERSION']} docker={config['IN_DOCKER']} is_tty={config['IS_TTY']}\n") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should there be a |
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,7 @@ | |
"django-extensions>=3.0.3", | ||
"dateparser>=1.0.0", | ||
"youtube-dl>=2021.04.17", | ||
"yt-dlp>=2021.4.11", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I arbitrarily picked this version number to be the first datestamp ahead of the youtube-dl version. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you can bump this to the latest version whenever you touch these files (as long as it works), no need to match older versions of chrome/youtubledl/ffmpeg/git/wget, only django and a couple other edge cases are the ones that cant be bumped |
||
"python-crontab>=2.5.1", | ||
"croniter>=0.3.34", | ||
"w3lib>=1.22.0", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The order of these flags is---confusingly---quite important.
yt-dlp/yt-dlp#4914