mirror of
https://github.com/simon987/hexlib.git
synced 2025-04-19 01:36:42 +00:00
Add session arg to get_web
This commit is contained in:
parent
c79b3bfafd
commit
8378ed6526
@ -35,10 +35,11 @@ def redis_publish(rdb, item, item_project, item_type, item_subproject=None, ite
|
|||||||
rdb.lpush(routing_key, item)
|
rdb.lpush(routing_key, item)
|
||||||
|
|
||||||
|
|
||||||
def get_web():
|
def get_web(session=None):
|
||||||
ua = UserAgent()
|
ua = UserAgent()
|
||||||
|
|
||||||
return Web(
|
return Web(
|
||||||
|
session=session,
|
||||||
proxy=os.environ.get("PROXY", None),
|
proxy=os.environ.get("PROXY", None),
|
||||||
rps=os.environ.get("RPS", 1),
|
rps=os.environ.get("RPS", 1),
|
||||||
logger=stdout_logger,
|
logger=stdout_logger,
|
||||||
|
2
setup.py
2
setup.py
@ -2,7 +2,7 @@ from setuptools import setup
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="hexlib",
|
name="hexlib",
|
||||||
version="1.34",
|
version="1.35",
|
||||||
description="Misc utility methods",
|
description="Misc utility methods",
|
||||||
author="simon987",
|
author="simon987",
|
||||||
author_email="me@simon987.net",
|
author_email="me@simon987.net",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user