webtoolkit 0.1.57__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.57 → webtoolkit-0.1.58}/PKG-INFO +1 -1
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/pyproject.toml +1 -1
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/baseurl.py +6 -2
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/handlers/defaulturlhandler.py +2 -3
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/remoteserver.py +5 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/LICENSE +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/README.md +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/__init__.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/contentinterface.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/contentlinkparser.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/contentmoderation.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/contenttext.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/crawlers/__init__.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/crawlers/crawlerinterface.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/crawlers/requestscrawler.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/domaincache.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/handlers/__init__.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/handlers/handlerchannelodysee.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/handlers/handlerchannelyoutube.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/handlers/handlerhttppage.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/handlers/handlerinterface.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/handlers/handlers.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/handlers/handlervideoodysee.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/handlers/handlervideoyoutube.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/pages.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/remoteurl.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/request.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/response.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/statuses.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/tests/__init__.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/tests/fake/__init__.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/tests/fake/codeproject.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/tests/fake/firebog.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/tests/fake/geekwirecom.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/tests/fake/githubcom.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/tests/fake/hackernews.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/tests/fake/instance.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/tests/fake/opmlfile.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/tests/fake/reddit.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/tests/fake/returndislike.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/tests/fake/robotstxtcom.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/tests/fake/thehill.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/tests/fake/warhammercommunity.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/tests/fake/youtube.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/tests/fakeinternet.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/tests/fakeinternetcontents.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/tests/fakeresponse.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/tests/mocks.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/urllocation.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/utils/dateutils.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/utils/logger.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/utils/memorychecker.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/webconfig.py +0 -0
- {webtoolkit-0.1.57 → webtoolkit-0.1.58}/webtoolkit/webtools.py +0 -0
|
@@ -550,7 +550,7 @@ class BaseUrl(ContentInterface):
|
|
|
550
550
|
request_data["crawler_type"] = type(request_data["crawler_type"]).__name__
|
|
551
551
|
all_properties.append({"name": "Request", "data": request_data})
|
|
552
552
|
|
|
553
|
-
response_data = self.get_response_data(
|
|
553
|
+
response_data = self.get_response_data()
|
|
554
554
|
all_properties.append({"name": "Response", "data": response_data})
|
|
555
555
|
if response:
|
|
556
556
|
raw_headers_data = response.get_headers()
|
|
@@ -639,10 +639,14 @@ class BaseUrl(ContentInterface):
|
|
|
639
639
|
|
|
640
640
|
return response_data
|
|
641
641
|
|
|
642
|
-
def get_response_data(self
|
|
642
|
+
def get_response_data(self):
|
|
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,10 @@ 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
|
+
|
|
238
242
|
"""
|
|
239
243
|
responses = RemoteServer.get_responses(all_properties)
|
|
240
244
|
if not responses:
|
|
@@ -256,6 +260,7 @@ class RemoteServer(object):
|
|
|
256
260
|
for url in responses:
|
|
257
261
|
return responses[url]
|
|
258
262
|
"""
|
|
263
|
+
|
|
259
264
|
response_data = RemoteServer.read_properties_section("Response", all_properties)
|
|
260
265
|
response = json_to_response(response_data)
|
|
261
266
|
return 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
|
|
File without changes
|