webtoolkit 0.1.55__tar.gz → 0.1.58__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.
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/PKG-INFO +1 -1
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/pyproject.toml +1 -1
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/baseurl.py +4 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/handlers/defaulturlhandler.py +2 -3
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/remoteserver.py +10 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/remoteurl.py +1 -4
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/LICENSE +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/README.md +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/__init__.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/contentinterface.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/contentlinkparser.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/contentmoderation.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/contenttext.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/crawlers/__init__.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/crawlers/crawlerinterface.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/crawlers/requestscrawler.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/domaincache.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/handlers/__init__.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/handlers/handlerchannelodysee.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/handlers/handlerchannelyoutube.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/handlers/handlerhttppage.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/handlers/handlerinterface.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/handlers/handlers.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/handlers/handlervideoodysee.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/handlers/handlervideoyoutube.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/pages.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/request.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/response.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/statuses.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/tests/__init__.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/tests/fake/__init__.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/tests/fake/codeproject.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/tests/fake/firebog.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/tests/fake/geekwirecom.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/tests/fake/githubcom.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/tests/fake/hackernews.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/tests/fake/instance.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/tests/fake/opmlfile.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/tests/fake/reddit.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/tests/fake/returndislike.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/tests/fake/robotstxtcom.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/tests/fake/thehill.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/tests/fake/warhammercommunity.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/tests/fake/youtube.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/tests/fakeinternet.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/tests/fakeinternetcontents.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/tests/fakeresponse.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/tests/mocks.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/urllocation.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/utils/dateutils.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/utils/logger.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/utils/memorychecker.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/webconfig.py +0 -0
- {webtoolkit-0.1.55 → webtoolkit-0.1.58}/webtoolkit/webtools.py +0 -0
|
@@ -643,6 +643,10 @@ class BaseUrl(ContentInterface):
|
|
|
643
643
|
"""
|
|
644
644
|
Returns response data
|
|
645
645
|
Easy digestible response data
|
|
646
|
+
|
|
647
|
+
It is handler responsibility to provide response and streams.
|
|
648
|
+
Main response should not be valid if any stream is not valid.
|
|
649
|
+
Hash should also be properly calculated
|
|
646
650
|
"""
|
|
647
651
|
response = self.get_response()
|
|
648
652
|
response_data = self.response_to_data(response)
|
|
@@ -145,9 +145,8 @@ class DefaultCompoundChannelHandler(DefaultChannelHandler):
|
|
|
145
145
|
def get_response(self):
|
|
146
146
|
"""
|
|
147
147
|
There can be many responses.
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
If responses are valid return best match
|
|
148
|
+
- If at least one is invalid - return it. Maybe we could merge responses somehow
|
|
149
|
+
- If responses are valid return best match
|
|
151
150
|
"""
|
|
152
151
|
valid_responses = []
|
|
153
152
|
invalid_responses = []
|
|
@@ -235,6 +235,11 @@ class RemoteServer(object):
|
|
|
235
235
|
return responses
|
|
236
236
|
|
|
237
237
|
def get_response(all_properties):
|
|
238
|
+
"""
|
|
239
|
+
Returns response from all properties
|
|
240
|
+
"""
|
|
241
|
+
|
|
242
|
+
"""
|
|
238
243
|
responses = RemoteServer.get_responses(all_properties)
|
|
239
244
|
if not responses:
|
|
240
245
|
return
|
|
@@ -254,6 +259,11 @@ class RemoteServer(object):
|
|
|
254
259
|
# return first found response
|
|
255
260
|
for url in responses:
|
|
256
261
|
return responses[url]
|
|
262
|
+
"""
|
|
263
|
+
|
|
264
|
+
response_data = RemoteServer.read_properties_section("Response", all_properties)
|
|
265
|
+
response = json_to_response(response_data)
|
|
266
|
+
return response
|
|
257
267
|
|
|
258
268
|
def encode(data):
|
|
259
269
|
return urllib.parse.quote(data, safe="")
|
|
@@ -81,10 +81,7 @@ class RemoteUrl(ContentInterface):
|
|
|
81
81
|
if not responses:
|
|
82
82
|
return
|
|
83
83
|
|
|
84
|
-
|
|
85
|
-
return responses["Default"]
|
|
86
|
-
for url in responses:
|
|
87
|
-
return responses[url]
|
|
84
|
+
return RemoteServer.get_response(self.all_properties)
|
|
88
85
|
|
|
89
86
|
def get_text(self):
|
|
90
87
|
"""Provides URL response text. Useful if link provides one response."""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|