mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-24 19:54:25 -04:00
update Snapshot.title to latest_title after fetching
This commit is contained in:
parent
943453a9a8
commit
af9084ee95
1 changed files with 7 additions and 0 deletions
|
@ -85,6 +85,13 @@ def archive_link(link: Link, overwrite: bool=False, out_dir: Optional[str]=None)
|
||||||
|
|
||||||
# print(' ', stats)
|
# print(' ', stats)
|
||||||
|
|
||||||
|
try:
|
||||||
|
latest_title = link.history['title'][-1].output.strip()
|
||||||
|
if latest_title and len(latest_title) >= len(link.title or ''):
|
||||||
|
link = link.overwrite(title=latest_title)
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
write_link_details(link, out_dir=link.link_dir)
|
write_link_details(link, out_dir=link.link_dir)
|
||||||
patch_main_index(link)
|
patch_main_index(link)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue