abstract-solana 0.0.2.6__tar.gz → 0.0.2.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of abstract-solana might be problematic. Click here for more details.

Files changed (29) hide show
  1. {abstract_solana-0.0.2.6 → abstract_solana-0.0.2.9}/PKG-INFO +1 -1
  2. {abstract_solana-0.0.2.6 → abstract_solana-0.0.2.9}/README.md +0 -0
  3. abstract_solana-0.0.2.9/pyproject.toml +3 -0
  4. {abstract_solana-0.0.2.6 → abstract_solana-0.0.2.9}/setup.py +34 -34
  5. {abstract_solana-0.0.2.6 → abstract_solana-0.0.2.9}/src/abstract_solana/__init__.py +0 -0
  6. {abstract_solana-0.0.2.6 → abstract_solana-0.0.2.9}/src/abstract_solana/abstract_rpcs/__init__.py +2 -1
  7. {abstract_solana-0.0.2.6 → abstract_solana-0.0.2.9}/src/abstract_solana/abstract_rpcs/db_templates.py +0 -0
  8. {abstract_solana-0.0.2.6 → abstract_solana-0.0.2.9}/src/abstract_solana/abstract_rpcs/get_api_gui.py +0 -0
  9. {abstract_solana-0.0.2.6 → abstract_solana-0.0.2.9}/src/abstract_solana/abstract_rpcs/get_body.py +0 -0
  10. abstract_solana-0.0.2.9/src/abstract_solana/abstract_rpcs/rate_limiter.py +178 -0
  11. {abstract_solana-0.0.2.6 → abstract_solana-0.0.2.9}/src/abstract_solana/abstract_rpcs/solana_rpc_client.py +16 -9
  12. {abstract_solana-0.0.2.6 → abstract_solana-0.0.2.9}/src/abstract_solana/abstract_utils/__init__.py +0 -0
  13. {abstract_solana-0.0.2.6 → abstract_solana-0.0.2.9}/src/abstract_solana/abstract_utils/account_key_utils.py +0 -0
  14. {abstract_solana-0.0.2.6 → abstract_solana-0.0.2.9}/src/abstract_solana/abstract_utils/constants.py +0 -0
  15. {abstract_solana-0.0.2.6 → abstract_solana-0.0.2.9}/src/abstract_solana/abstract_utils/genesis_functions.py +0 -0
  16. {abstract_solana-0.0.2.6 → abstract_solana-0.0.2.9}/src/abstract_solana/abstract_utils/index_utils.py +0 -0
  17. {abstract_solana-0.0.2.6 → abstract_solana-0.0.2.9}/src/abstract_solana/abstract_utils/keypair_utils.py +0 -0
  18. {abstract_solana-0.0.2.6 → abstract_solana-0.0.2.9}/src/abstract_solana/abstract_utils/log_message_functions.py +0 -0
  19. {abstract_solana-0.0.2.6 → abstract_solana-0.0.2.9}/src/abstract_solana/abstract_utils/price_utils.py +0 -0
  20. {abstract_solana-0.0.2.6 → abstract_solana-0.0.2.9}/src/abstract_solana/abstract_utils/pubkey_utils.py +0 -0
  21. {abstract_solana-0.0.2.6 → abstract_solana-0.0.2.9}/src/abstract_solana/abstract_utils/signature_data_parse.py +0 -0
  22. {abstract_solana-0.0.2.6 → abstract_solana-0.0.2.9}/src/abstract_solana/abstract_utils/utils.py +0 -0
  23. {abstract_solana-0.0.2.6 → abstract_solana-0.0.2.9}/src/abstract_solana.egg-info/PKG-INFO +1 -1
  24. {abstract_solana-0.0.2.6 → abstract_solana-0.0.2.9}/src/abstract_solana.egg-info/SOURCES.txt +1 -0
  25. {abstract_solana-0.0.2.6 → abstract_solana-0.0.2.9}/src/abstract_solana.egg-info/dependency_links.txt +0 -0
  26. {abstract_solana-0.0.2.6 → abstract_solana-0.0.2.9}/src/abstract_solana.egg-info/requires.txt +0 -0
  27. {abstract_solana-0.0.2.6 → abstract_solana-0.0.2.9}/src/abstract_solana.egg-info/top_level.txt +0 -0
  28. abstract_solana-0.0.2.6/src/abstract_solana/abstract_rpcs/rate_limiter.py +0 -141
  29. {abstract_solana-0.0.2.6 → abstract_solana-0.0.2.9}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: abstract_solana
3
- Version: 0.0.2.6
3
+ Version: 0.0.2.9
4
4
  Home-page: https://github.com/AbstractEndeavors/abstract_solana
5
5
  Author: putkoff
6
6
  Author-email: partners@abstractendeavors.com
@@ -0,0 +1,3 @@
1
+ [build-system]
2
+ requires = ["setuptools>=42", "wheel"]
3
+ build-backend = "setuptools.build_meta"
@@ -1,34 +1,34 @@
1
- from time import time
2
- import setuptools
3
- with open("README.md", "r", encoding="utf-8") as fh:
4
- long_description = fh.read()
5
- setuptools.setup(
6
- name='abstract_solana',
7
- version='0.0.2.06',
8
- author='putkoff',
9
- author_email='partners@abstractendeavors.com',
10
- description="",
11
- long_description=long_description,
12
- long_description_content_type='text/markdown',
13
- url='https://github.com/AbstractEndeavors/abstract_solana',
14
- classifiers=[
15
- 'Development Status :: 3 - Alpha',
16
- 'Intended Audience :: Developers',
17
- 'Topic :: Software Development :: Libraries',
18
- 'License :: OSI Approved :: MIT License',
19
- 'Programming Language :: Python :: 3',
20
- 'Programming Language :: Python :: 3.6',
21
- 'Programming Language :: Python :: 3.7',
22
- 'Programming Language :: Python :: 3.8',
23
- 'Programming Language :: Python :: 3.9',
24
- 'Programming Language :: Python :: 3.10',
25
- 'Programming Language :: Python :: 3.11',
26
- 'Programming Language :: Python :: 3.12',
27
- ],
28
- install_requires=['solders','abstract_solcatcher','abstract_utilities','solana'],
29
- package_dir={"": "src"},
30
- packages=setuptools.find_packages(where="src"),
31
- python_requires=">=3.6",
32
- # Add this line to include wheel format in your distribution
33
- setup_requires=['wheel'],
34
- )
1
+ from time import time
2
+ import setuptools
3
+ with open("README.md", "r", encoding="utf-8") as fh:
4
+ long_description = fh.read()
5
+ setuptools.setup(
6
+ name='abstract_solana',
7
+ version='0.0.2.9',
8
+ author='putkoff',
9
+ author_email='partners@abstractendeavors.com',
10
+ description="",
11
+ long_description=long_description,
12
+ long_description_content_type='text/markdown',
13
+ url='https://github.com/AbstractEndeavors/abstract_solana',
14
+ classifiers=[
15
+ 'Development Status :: 3 - Alpha',
16
+ 'Intended Audience :: Developers',
17
+ 'Topic :: Software Development :: Libraries',
18
+ 'License :: OSI Approved :: MIT License',
19
+ 'Programming Language :: Python :: 3',
20
+ 'Programming Language :: Python :: 3.6',
21
+ 'Programming Language :: Python :: 3.7',
22
+ 'Programming Language :: Python :: 3.8',
23
+ 'Programming Language :: Python :: 3.9',
24
+ 'Programming Language :: Python :: 3.10',
25
+ 'Programming Language :: Python :: 3.11',
26
+ 'Programming Language :: Python :: 3.12',
27
+ ],
28
+ install_requires=['solders','abstract_solcatcher','abstract_utilities','solana'],
29
+ package_dir={"": "src"},
30
+ packages=setuptools.find_packages(where="src"),
31
+ python_requires=">=3.6",
32
+ # Add this line to include wheel format in your distribution
33
+ setup_requires=['wheel'],
34
+ )
@@ -1,3 +1,4 @@
1
1
  from .get_body import *
2
2
  from .db_templates import *
3
- from .solana_rpc_client import get_rpc_dict,abstract_solana_rate_limited_call
3
+ from .solana_rpc_client import get_rpc_dict,abstract_solana_rate_limited_call,make_call
4
+ from .rate_limiter import *
@@ -0,0 +1,178 @@
1
+ import time
2
+ import os
3
+ import json
4
+ from datetime import datetime
5
+
6
+ from abstract_utilities import *
7
+ from abstract_security import get_env_value
8
+ def getAbsFile():
9
+ return os.path.abspath(__file__)
10
+ def getAbsDir():
11
+ return os.path.dirname(getAbsFile())
12
+ def getAbsPath(path):
13
+ return os.path.join(getAbsDir(),path)
14
+ def getSaveStatePath():
15
+ return getAbsPath('rate_limiter_state.json')
16
+ def readSaveState(url1,url2,path=None):
17
+ path= path or getSaveStatePath()
18
+ if not os.path.isfile(path):
19
+ state = {'last_method':None,'rate_limits': {url1: [], url2: []},'last_mb': {url1: {}, url2: {}},'cooldown_times': {url1: {}, url2: {}},'last_url':url1}
20
+ safe_dump_to_file(data=state,file_path=path)
21
+ return safe_read_from_json(path)
22
+ def is_time_interval(time_obj, interval):
23
+ return (time.time() - time_obj) < interval-1
24
+
25
+ def get_mb(sum_list, limit, last_mb):
26
+ return (sum_list + last_mb) > limit
27
+
28
+ def datasize(data):
29
+ if isinstance(data, str):
30
+ size = len(data.encode('utf-8'))
31
+ elif isinstance(data, (bytes, bytearray)):
32
+ size = len(data)
33
+ elif isinstance(data, list) or isinstance(data, dict):
34
+ size = len(json.dumps(data).encode('utf-8'))
35
+ else:
36
+ size = len(str(data).encode('utf-8'))
37
+ return size/1000
38
+ class RateLimiter(metaclass=SingletonMeta):
39
+ def __init__(self, rpc_url=None, fallback_rpc_url=None, env_directory=None,save_state_path = None):
40
+ if not hasattr(self, 'initialized'): # Prevent reinitialization
41
+ self.initialized = True
42
+ self.rpc_url = rpc_url or get_env_value(key="solana_primary_rpc_url", path=env_directory) or "http://api.mainnet-beta.solana.com"
43
+ self.fallback_rpc_url = fallback_rpc_url or get_env_value(key="solana_fallback_rpc_url", path=env_directory)
44
+ self.state_file = save_state_path or getSaveStatePath()
45
+ self.url1 = self.rpc_url
46
+ self.url2 = self.fallback_rpc_url
47
+ self.rate_limits = {self.url1: [], self.url2: []} # Separate rate limits for each URL
48
+ self.last_mb = {self.url1: {}, self.url2: {}}
49
+ self.cooldown_times = {self.url1: {}, self.url2: {}} # Separate cooldowns for each URL
50
+ self.last_url = None
51
+ self.last_method = None
52
+ self.load_state()
53
+
54
+ def save_state(self):
55
+ state = {
56
+ 'last_method': self.last_method,
57
+ 'rate_limits': self.rate_limits,
58
+ 'last_mb': self.last_mb,
59
+ 'cooldown_times': self.cooldown_times,
60
+ 'last_url': self.last_url
61
+ }
62
+ safe_dump_to_file(data=state, file_path=self.state_file)
63
+
64
+ def load_state(self):
65
+ state = readSaveState(self.url1,self.url2)
66
+ self.last_method = state.get('last_method')
67
+ self.rate_limits = state.get('rate_limits', {self.url1: [], self.url2: []})
68
+ self.last_mb = state.get('last_mb', {self.url1: {}, self.url2: {}})
69
+ self.cooldown_times = state.get('cooldown_times', {self.url1: {}, self.url2: {}})
70
+
71
+ def set_cooldown(self, url, method=None, add=False):
72
+ if method:
73
+ if add:
74
+ self.cooldown_times[url][method] = time.time() + add
75
+ if method in self.cooldown_times[url] and time.time() > self.cooldown_times[url][method]:
76
+ del self.cooldown_times[url][method]
77
+ return method in self.cooldown_times[url]
78
+ return False
79
+
80
+ def get_last_rate_limit(self, url):
81
+ if self.rate_limits[url]:
82
+ return self.rate_limits[url][-1]
83
+ return {}
84
+
85
+ def is_all_limit(self, url, method):
86
+ if url == self.url1:
87
+ if method not in self.last_mb:
88
+ self.last_mb[method] = 0
89
+
90
+ if self.set_cooldown(url, method):
91
+ print(f'set_cooldown for method {method} in {url} hit')
92
+ return True
93
+
94
+ # Clean up expired queries for the current URL
95
+ self.rate_limits[url] = [
96
+ query for query in self.rate_limits[url] if is_time_interval(query.get('time') or 0, 30)
97
+ ]
98
+ last_rate_limit = self.get_last_rate_limit(url)
99
+
100
+ # Check data size limits
101
+ total_mb = sum(query.get('data', 0) for query in self.rate_limits[url])
102
+ mb = get_mb(total_mb, 100, self.last_mb[url][method])
103
+ if mb:
104
+ print(f'mb {total_mb} of limit 100 hit')
105
+ return True
106
+
107
+ # Check if the last request for the same method was within 10 seconds
108
+ time_rate = [
109
+ query for query in self.rate_limits[url] if is_time_interval(query.get('time') or 0, 10)
110
+ ]
111
+ if len(time_rate) > 100:
112
+ print(f'time_rate {time_rate} of timerate limit 100 hit')
113
+ return True
114
+
115
+ method_specific_time_rate = [
116
+ query for query in time_rate if query['method'] == method
117
+ ]
118
+ if len(method_specific_time_rate) > 40:
119
+ print(f'method_specific_time_rate {len(method_specific_time_rate)} of method_specific_time_rate limit 40 hit')
120
+ return True
121
+
122
+ return False
123
+
124
+ def log_response(self, method=None, response=None, retry_after=None):
125
+ method = method or 'default_method'
126
+ response = response or {}
127
+ data_size = datasize(response)
128
+ active_url = self.last_url
129
+
130
+ # Handle Retry-After logic
131
+ if retry_after:
132
+ try:
133
+ wait_time = int(retry_after)
134
+ except ValueError:
135
+ retry_after_date = datetime.strptime(retry_after, '%a, %d %b %Y %H:%M:%S GMT')
136
+ wait_time = (retry_after_date - datetime.utcnow()).total_seconds()
137
+ self.set_cooldown(active_url, method, add=max(wait_time, 0))
138
+
139
+ if active_url == self.url1:
140
+ self.rate_limits[active_url].append({'method': method, 'data': data_size, 'time': time.time()})
141
+
142
+ # Clean up expired entries for the current URL
143
+ self.rate_limits[active_url] = [
144
+ query for query in self.rate_limits[active_url] if is_time_interval(query['time'], 30)
145
+ ]
146
+ self.save_state()
147
+ def get_cooldown_for_method(self,url,method):
148
+ wait_time = 0
149
+ if self.set_cooldown(url,method):
150
+ wait_time = int(self.cooldown_times[url][method]) - time.time()
151
+ if wait_time <= 0:
152
+ del self.cooldown_times[url][method]
153
+
154
+ else:
155
+ return wait_time
156
+ return False
157
+ def get_url(self, method=None):
158
+ method = method or 'default_method'
159
+ wait_time = self.get_cooldown_for_method(self.url1,method)
160
+
161
+ if wait_time:
162
+ wait_time = int(self.cooldown_times[self.url1][method]) - time.time()
163
+ if wait_time > 0:
164
+ self.last_url = self.url2
165
+ #retry_after_date = datetime.strptime(str(int(self.cooldown_times[method])), '%a, %d %b %Y %H:%M:%S GMT')
166
+ print(f"{method} is on cooldown for {wait_time} more seconds")
167
+ if method == 'get_url2':
168
+ self.last_url = self.url2
169
+ return self.last_url
170
+ # If fallback URL is selected, skip all limits
171
+
172
+ is_limit = self.is_all_limit(self.url1, method)
173
+ if not is_limit:
174
+ self.last_method = method
175
+ self.last_url = self.url1
176
+ print([is_limit,self.last_url])
177
+ return self.last_url
178
+
@@ -1,11 +1,11 @@
1
1
  from solana.rpc.core import _ClientCore
2
2
  from typing import Dict, List, Optional, Sequence, Union
3
3
  from solana.rpc.commitment import Commitment, Finalized
4
- from ..abstract_utils.pubkey_utils import get_pubkey,get_sigkey
4
+ from .rate_limiter import RateLimiter
5
+ from ..abstract_utils.pubkey_utils import *
5
6
  import inspect,asyncio,json,requests
6
- from abstract_apis import get_url,make_endpoint,get_headers,asyncPostRequest,get_async_response,get_headers
7
+ from abstract_apis import *
7
8
  from abstract_utilities import is_number
8
- from .rate_limiter import RateLimiter
9
9
  rate_limiter = RateLimiter()
10
10
  def convert_to_lower(string_obj):
11
11
  return ''.join(f"_{char.lower()}" if char.isupper() else char for char in str(string_obj))
@@ -85,10 +85,17 @@ def get_rpc_dict(endpoint,*args,**kwargs):
85
85
  kwargs = get_conversions(variables,*args,**kwargs)
86
86
  kwargs = json.loads(str(call_function(function,**kwargs)))
87
87
  return kwargs
88
- def abstract_solana_rate_limited_call(endpoint,*args,**kwargs):
89
- rpc_dict = get_rpc_dict(endpoint,*args,**kwargs)
90
- url = rate_limiter.get_url(rpc_dict.get('method'))
91
- if isinstance(url,dict):
92
- return url
93
- response = get_async_response(asyncPostRequest,url=url,endpoint=endpoint,data=rpc_dict)
88
+ def make_call(url,body):
89
+ return postRpcRequest(url=url,**body,retry_after =True,status_code=True, headers=get_headers())
90
+ def abstract_solana_rate_limited_call(method, *args, **kwargs):
91
+ # Build the request body
92
+ body = get_rpc_dict(method, *args, **kwargs)
93
+ body_method = body.get('method')
94
+ url = rate_limiter.get_url(body_method)
95
+ response,status_code,retry_after = make_call(url,body)
96
+ rate_limiter.log_response(body_method, response, retry_after)
97
+ if url == rate_limiter.url1 and status_code == 429:
98
+ url = rate_limiter.get_url('get_url2')
99
+ response,status_code,retry_after = make_call(url,body)
100
+ rate_limiter.log_response(body_method, response)
94
101
  return response
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: abstract_solana
3
- Version: 0.0.2.6
3
+ Version: 0.0.2.9
4
4
  Home-page: https://github.com/AbstractEndeavors/abstract_solana
5
5
  Author: putkoff
6
6
  Author-email: partners@abstractendeavors.com
@@ -1,4 +1,5 @@
1
1
  README.md
2
+ pyproject.toml
2
3
  setup.py
3
4
  src/abstract_solana/__init__.py
4
5
  src/abstract_solana.egg-info/PKG-INFO
@@ -1,141 +0,0 @@
1
- import time,os,json
2
- from abstract_utilities import *
3
- from abstract_security import *
4
- def getAbsFile():
5
- return os.path.abspath(__file__)
6
- def getAbsDir():
7
- return os.path.dirname(getAbsFile())
8
- def getAbsPath(path):
9
- return os.path.join(getAbsDir(),path)
10
- def getSaveStatePath():
11
- return getAbsPath('rate_limiter_state.json')
12
- def readSaveState():
13
- path= getSaveStatePath()
14
- if not os.path.isfile(path):
15
- state = {'last_method':None,'rate_limit': [],'last_mb': {},'cooldown_time': False,'last_url':None}
16
- safe_dump_to_file(file_path=path,data=state)
17
- return safe_read_from_json(getSaveStatePath())
18
- def is_time_interval(time_obj, interval):
19
- print([time.time() - time_obj,interval-1])
20
- return (time.time() - time_obj) < interval-1
21
-
22
- def get_mb(sum_list, limit, last_mb):
23
- return (sum_list + last_mb) > limit
24
-
25
- def datasize(data):
26
- if isinstance(data, str):
27
- return len(data.encode('utf-8'))
28
- elif isinstance(data, (bytes, bytearray)):
29
- return len(data)
30
- elif isinstance(data, list) or isinstance(data, dict):
31
- return len(json.dumps(data).encode('utf-8'))
32
- else:
33
- return len(str(data).encode('utf-8'))
34
-
35
- class RateLimiter(metaclass=SingletonMeta):
36
- def __init__(self,rpc_url = None,fallback_rpc_url=None,env_directory=None):
37
- if not hasattr(self, 'initialized'): # Prevent reinitialization
38
- self.initialized = True
39
- self.rpc_url = rpc_url or get_env_value(key="solana_primary_rpc_url",path=env_directory) or "https://api.mainnet-beta.solana.com"
40
- self.fallback_rpc_url = fallback_rpc_url or get_env_value(key="solana_fallback_rpc_url",path=env_directory)
41
- self.initialized = True
42
- self.rate_limit = []
43
- self.last_mb = {}
44
- self.cooldown_time = False
45
- self.url1 = self.rpc_url
46
- self.url2 = self.fallback_rpc_url
47
- self.state_file = getSaveStatePath()
48
- self.last_url = None
49
- self.last_method=None
50
- self.load_state()
51
- def get_url_2(self):
52
- return self.url2
53
-
54
- def save_state(self):
55
- state = {
56
- 'last_method':self.last_method,
57
- 'rate_limit': self.rate_limit,
58
- 'last_mb': self.last_mb,
59
- 'cooldown_time': self.cooldown_time,
60
- 'last_url': self.last_url
61
- }
62
- safe_dump_to_file(self.state_file, state)
63
-
64
- def load_state(self):
65
- state = readSaveState()
66
- self.last_method = state.get('last_method')
67
- self.rate_limit = state.get('rate_limit', [])
68
- self.last_mb = state.get('last_mb', {})
69
- self.last_url = state.get('last_url')
70
- self.cooldown_time = state.get('cooldown_time', False)
71
-
72
- def set_cooldown(self, add=False):
73
- if add:
74
- self.cooldown_time = time.time() + add
75
- if self.cooldown_time and (time.time() > self.cooldown_time):
76
- self.cooldown_time = False
77
- return bool(self.cooldown_time)
78
-
79
- def get_last_rate_limit(self):
80
- if self.rate_limit:
81
- return self.rate_limit[-1]
82
- return {}
83
-
84
- def is_all_limit(self, method):
85
- if method not in self.last_mb:
86
- self.last_mb[method] = 0
87
-
88
- if self.set_cooldown():
89
- return True
90
-
91
- self.rate_limit = [query for query in self.rate_limit if is_time_interval(query.get('time') or 0, 30)]
92
- last_rate_limit = self.get_last_rate_limit()
93
-
94
- # Check if data size exceeds limit
95
- if get_mb(sum(query.get('data', 0) for query in self.rate_limit), 100, self.last_mb[method]):
96
- return True
97
-
98
- # Check if the last request for the same method was within 10 seconds
99
- if self.last_method == method and is_time_interval(last_rate_limit.get('time') or 0, 10):
100
- return True
101
-
102
- # Check if more than 100 requests in the last 10 seconds
103
- time_rate = [query for query in self.rate_limit if is_time_interval(query.get('time') or 0, 10)]
104
- if len(time_rate) > 100:
105
- return True
106
-
107
- # Check if more than 40 requests for the same method in the last 10 seconds
108
- method_specific_time_rate = [query for query in time_rate if query['method'] == method]
109
- if len(method_specific_time_rate) > 40:
110
- return True
111
-
112
- return False
113
-
114
- def log_response(self, method=None, response_data=None):
115
- method = method or 'default_method'
116
- response_data = response_data or {}
117
- data_size = datasize(response_data)
118
- self.last_mb[method] = data_size
119
-
120
- if self.last_url == self.url1:
121
- self.rate_limit.append({'method': method, 'data': data_size, 'time': time.time()})
122
-
123
- self.rate_limit = [query for query in self.rate_limit if is_time_interval(query['time'], 30)]
124
- self.save_state()
125
-
126
- def get_url(self, method=None):
127
- method = method or 'default_method'
128
- if self.url2 and method == 'get_url_2':
129
- self.last_url = self.url2
130
- return self.url2
131
-
132
- if not self.is_all_limit(method):
133
- self.last_method = method
134
-
135
- self.last_url = self.url1
136
- elif self.url2:
137
- self.last_url = self.url2
138
- else:
139
- return {"rate_limited":"limit has been reached"}
140
- return self.last_url
141
-