sachin-sankar / swiftshadow

Free IP Proxy rotator library for python
https://sachin-sankar.github.io/swiftshadow/
GNU General Public License v3.0
95 stars 6 forks source link

Proxy() is gone #26

Closed toneman77 closed 4 months ago

toneman77 commented 5 months ago

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 nor

from swiftshadow import Proxy

work. I tried 1.1.0 and also directly from git. No difference Am I doing something wrong?

shayoyem commented 5 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.

sachin-sankar commented 5 months ago

I have started to look into this issue.

sachin-sankar commented 4 months ago

Fixed in #27

sachin-sankar commented 4 months ago

Closing issue

toneman77 commented 4 months ago

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?