Closed toneman77 closed 4 months ago
I'd like to add to this, I'm using the Proxy()
Using this code:
from swiftshadow.classes import Proxy
swift = Proxy(autoRotate=True)
proxy=swift.proxy()
I get this text: swiftshadow [INFO]:Cache expired. Updating cache. My program waits on this text for longer than it used to and seemingly never moves on.
I have started to look into this issue.
Fixed in #27
Closing issue
installed 1.2.0 in a blank ubuntu docker container: (python 3.10)
>>> from swiftshadow import QuickProxy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.10/dist-packages/swiftshadow/__init__.py", line 1, in <module>
from swiftshadow.providers import Providers
File "/usr/local/lib/python3.10/dist-packages/swiftshadow/providers.py", line 14
proxy = [f'{proxy['host']}:{proxy['port']}',proxy['protocol']]
^^^^
SyntaxError: f-string: unmatched '['
>>>
in python 3.12 it works. Is this a requirement?
For a few days now QuickProxy() takes several minutes(!) to return proxies to my code, so I thought: go back to the old way and use Proxy() and get a handful of proxies even if it takes longer and cache them. So I checked the docs on https://sachin-sankar.github.io/swiftshadow/references/ but neither
from swiftshadow.swiftshadow import Proxy
norfrom swiftshadow import Proxy
work. I tried 1.1.0 and also directly from git. No difference Am I doing something wrong?