mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-06-20 12:54:23 -04:00
Inccognito messes with currently running chromium instances, disable it
This commit is contained in:
parent
0c25bbb4c3
commit
bd0183058d
4 changed files with 7 additions and 7 deletions
|
@ -15,7 +15,7 @@ def print_and_ack(body, message):
|
||||||
print(body['url'])
|
print(body['url'])
|
||||||
message.ack()
|
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:
|
with conn.Consumer(requests_queue, callbacks=[print_and_ack]) as consumer:
|
||||||
while True:
|
while True:
|
||||||
conn.drain_events()
|
conn.drain_events()
|
||||||
|
|
|
@ -9,8 +9,8 @@ import threading
|
||||||
from kombu import Connection, Exchange, Queue
|
from kombu import Connection, Exchange, Queue
|
||||||
logging.basicConfig(level=logging.INFO)
|
logging.basicConfig(level=logging.INFO)
|
||||||
umbra_exchange = Exchange('umbra', 'direct', durable=True)
|
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')
|
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)
|
producer.publish({'url': url}, 'url', exchange=umbra_exchange)
|
||||||
|
|
||||||
|
|
6
setup.py
6
setup.py
|
@ -3,14 +3,14 @@ import setuptools
|
||||||
setuptools.setup(name='umbra',
|
setuptools.setup(name='umbra',
|
||||||
version='0.1',
|
version='0.1',
|
||||||
description='Google Chrome remote control interface',
|
description='Google Chrome remote control interface',
|
||||||
url='https://github.com/eldondev/umbra',
|
url='https://github.com/internetarchive/umbra',
|
||||||
author='Eldon Stegall',
|
author='Eldon Stegall',
|
||||||
author_email='eldon@archive.org',
|
author_email='eldon@archive.org',
|
||||||
long_description=open('README.md').read(),
|
long_description=open('README.md').read(),
|
||||||
license='GPL',
|
license='Apache License 2.0',
|
||||||
packages=['umbra'],
|
packages=['umbra'],
|
||||||
install_requires=['kombu', 'websocket-client-py3','argparse'],
|
install_requires=['kombu', 'websocket-client-py3','argparse'],
|
||||||
scripts=['bin/umbra'],
|
scripts=['bin/umbra', 'bin/load_url.py', 'bin/dump_queue.py'],
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Development Status :: 3 - Alpha Development Status',
|
'Development Status :: 3 - Alpha Development Status',
|
||||||
|
|
|
@ -91,7 +91,7 @@ class Chrome():
|
||||||
|
|
||||||
def __enter__(self):
|
def __enter__(self):
|
||||||
import subprocess
|
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()
|
start = time.time()
|
||||||
import socket
|
import socket
|
||||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue