diff --git a/bin/dump_queue.py b/bin/dump_queue.py index 32c4933..3585064 100755 --- a/bin/dump_queue.py +++ b/bin/dump_queue.py @@ -15,7 +15,7 @@ def print_and_ack(body, message): print(body['url']) message.ack() -with Connection('amqp://guest:guest@localhost:5672//') as conn: +with Connection(sys.argv[1]) as conn: with conn.Consumer(requests_queue, callbacks=[print_and_ack]) as consumer: while True: conn.drain_events() diff --git a/bin/load_url.py b/bin/load_url.py index 5b6146b..cea8899 100755 --- a/bin/load_url.py +++ b/bin/load_url.py @@ -9,8 +9,8 @@ import threading from kombu import Connection, Exchange, Queue logging.basicConfig(level=logging.INFO) umbra_exchange = Exchange('umbra', 'direct', durable=True) -with Connection('amqp://guest:guest@localhost:5672//') as conn: +with Connection(sys.argv[1]) as conn: producer = conn.Producer(serializer='json') - for url in sys.argv[1:]: + for url in sys.argv[2:]: producer.publish({'url': url}, 'url', exchange=umbra_exchange) diff --git a/setup.py b/setup.py index 7c82ee3..287f98c 100644 --- a/setup.py +++ b/setup.py @@ -3,14 +3,14 @@ import setuptools setuptools.setup(name='umbra', version='0.1', description='Google Chrome remote control interface', - url='https://github.com/eldondev/umbra', + url='https://github.com/internetarchive/umbra', author='Eldon Stegall', author_email='eldon@archive.org', long_description=open('README.md').read(), - license='GPL', + license='Apache License 2.0', packages=['umbra'], install_requires=['kombu', 'websocket-client-py3','argparse'], - scripts=['bin/umbra'], + scripts=['bin/umbra', 'bin/load_url.py', 'bin/dump_queue.py'], zip_safe=False, classifiers=[ 'Development Status :: 3 - Alpha Development Status', diff --git a/umbra/umbra.py b/umbra/umbra.py index 33cc2d4..bb8d6e1 100755 --- a/umbra/umbra.py +++ b/umbra/umbra.py @@ -91,7 +91,7 @@ class Chrome(): def __enter__(self): import subprocess - self.chrome_process = subprocess.Popen([self.executable, "--disable-web-sockets", "--incognito", "--temp-profile", "--remote-debugging-port=%s" % self.port]) + self.chrome_process = subprocess.Popen([self.executable, "--disable-web-sockets", "--disable-cache", "--temp-profile", "--remote-debugging-port=%s" % self.port]) start = time.time() import socket sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)