]> git.phdru.name Git - bookmarks_db.git/commitdiff
Fix(get_url.py): Fix call to `robot.get_url`
authorOleg Broytman <phd@phdru.name>
Tue, 10 Sep 2024 14:20:03 +0000 (17:20 +0300)
committerOleg Broytman <phd@phdru.name>
Tue, 10 Sep 2024 15:59:35 +0000 (18:59 +0300)
get_url.py

index 065df91544705f85053fc4fc393ce223e16cef70..c9b23e26db3df4524c1b28c4ae53e3abcaba27a9 100755 (executable)
@@ -12,7 +12,7 @@ import argparse
 import asyncio
 import sys
 
-from bkmk_objects import Bookmark
+from Robots.base import request_headers
 
 
 def run():
@@ -29,11 +29,8 @@ def run():
     robot = robot(sys.stdout.write)
 
     url = args.URL
-    bookmark = Bookmark(href=url, add_date=None)
-    bookmark.parent = None
-
     error, redirect_code, redirect_to, headers, content = \
-        asyncio.run(robot.get_url(bookmark, url, True))
+        asyncio.run(robot.get_url(url, request_headers))
     robot.stop()
 
     if error: