-#! /usr/local/bin/python -O
-"""
- Check URL - subprocess
+#! /usr/bin/env python
+"""Subprocess for the forking robot - check URL using bkmk_rurlib robot
+
+This file is a part of Bookmarks database and Internet robot.
- Written by BroytMann, Mar 1999 - Aug 2002. Copyright (C) 1999-2002 PhiloSoft Design
"""
+__author__ = "Oleg Broytman <phd@phdru.name>"
+__copyright__ = "Copyright (C) 1999-2014 PhiloSoft Design"
+__license__ = "GNU GPL"
+
+__all__ = []
+
-import sys, os, urllib
+import sys, os
-lib_dir = os.path.normpath(os.path.dirname(sys.argv[0]) + os.sep + os.pardir)
+lib_dir = os.path.normpath(os.path.join(os.path.dirname(sys.argv[0]), os.pardir))
sys.path.append(lib_dir) # for bkmk_objects.py
try:
import pickle
from subproc import RecordFile
-import bkmk_rsimple
def run():
from m_lib.flog import openlog
log = openlog("check2.log")
- from bkmk_rsimple import robot_simple
- robot = robot_simple(None, log)
+ from robots import robot
+ robot = robot(log)
while 1:
bookmark = pickle.loads(bkmk_in.read_record())
log(bookmark.href)
- url_type, url_rest = urllib.splittype(bookmark.href)
- robot.check_url(bookmark, url_type, url_rest)
+ robot.check_url(bookmark)
bkmk_out.write_record(pickle.dumps(bookmark))
log.outfile.flush()