mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-05-02 22:55:04 -04:00
Some refactor/testing and utility scripts
This commit is contained in:
parent
e0a2917b81
commit
4e38a142d4
4 changed files with 61 additions and 10 deletions
15
bin/load_url.py
Executable file
15
bin/load_url.py
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env python
|
||||
from json import dumps, loads
|
||||
import os,sys,argparse, urllib.request, urllib.error, urllib.parse
|
||||
import websocket
|
||||
import time
|
||||
import uuid
|
||||
import logging
|
||||
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:
|
||||
producer = conn.Producer(serializer='json')
|
||||
producer.publish({'url': sys.argv[1]}, 'url', exchange=umbra_exchange)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue