-#! /usr/bin/env python
+#! /usr/bin/env python3
"""Add a bookmark to the database
This file is a part of Bookmarks database and Internet robot.
__copyright__ = "Copyright (C) 2002-2023 PhiloSoft Design"
__license__ = "GNU GPL"
-import os
import sys
import time
bookmark.name = ''
bookmark.parent = None
- global robot
- robot = robot(None)
+ global _robot
+ _robot = robot(None)
- if robot.check_url(bookmark): # get real title and last modified date
+ if _robot.check_url(bookmark): # get real title and last modified date
if title: # forced title
bookmark.name = title
elif hasattr(bookmark, "real_title"):
bookmark.name = bookmark.real_title
if report_stats:
- sys.stdout.write("Adding %s with title '%s'\n" % (href, bookmark.name))
+ sys.stdout.write("Adding %s with title '%s'\n"
+ % (href, bookmark.name))
del bookmark.parent
root_folder.append(bookmark)