webtoolkit 0.1.68__tar.gz → 0.1.70__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.68 → webtoolkit-0.1.70}/PKG-INFO +1 -1
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/pyproject.toml +1 -1
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/remoteurl.py +12 -3
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/statuses.py +2 -2
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/LICENSE +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/README.md +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/__init__.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/baseurl.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/contentinterface.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/contentlinkparser.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/contentmoderation.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/contenttext.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/crawlers/__init__.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/crawlers/crawlerinterface.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/crawlers/requestscrawler.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/domaincache.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/handlers/__init__.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/handlers/defaulturlhandler.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/handlers/handlerchannelodysee.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/handlers/handlerchannelyoutube.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/handlers/handlerhttppage.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/handlers/handlerinterface.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/handlers/handlers.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/handlers/handlervideoodysee.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/handlers/handlervideoyoutube.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/pages.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/remoteserver.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/request.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/response.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/tests/__init__.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/tests/fake/__init__.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/tests/fake/codeproject.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/tests/fake/firebog.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/tests/fake/geekwirecom.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/tests/fake/githubcom.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/tests/fake/hackernews.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/tests/fake/instance.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/tests/fake/opmlfile.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/tests/fake/reddit.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/tests/fake/returndislike.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/tests/fake/robotstxtcom.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/tests/fake/thehill.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/tests/fake/warhammercommunity.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/tests/fake/youtube.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/tests/fakeinternet.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/tests/fakeinternetcontents.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/tests/fakeresponse.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/tests/mocks.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/urllocation.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/utils/__init__.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/utils/dateutils.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/utils/emailreader.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/utils/logger.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/utils/memorychecker.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/webconfig.py +0 -0
- {webtoolkit-0.1.68 → webtoolkit-0.1.70}/webtoolkit/webtools.py +0 -0
|
@@ -47,8 +47,6 @@ class RemoteUrl(ContentInterface):
|
|
|
47
47
|
if request is not None and url is None:
|
|
48
48
|
url = request.url
|
|
49
49
|
|
|
50
|
-
super().__init__(url=url, contents=None)
|
|
51
|
-
|
|
52
50
|
self.request = request
|
|
53
51
|
self.remote_server_location = remote_server_location
|
|
54
52
|
self.server = RemoteServer(remote_server=self.remote_server_location, key=key, client_id=client_id)
|
|
@@ -56,6 +54,14 @@ class RemoteUrl(ContentInterface):
|
|
|
56
54
|
self.social_properties = social_properties
|
|
57
55
|
|
|
58
56
|
self.responses = None
|
|
57
|
+
|
|
58
|
+
if url is None and self.all_properties:
|
|
59
|
+
properties = self.get_properties()
|
|
60
|
+
if properties:
|
|
61
|
+
url = properties.get("link")
|
|
62
|
+
|
|
63
|
+
super().__init__(url=url, contents=None)
|
|
64
|
+
|
|
59
65
|
if self.all_properties:
|
|
60
66
|
self.get_responses()
|
|
61
67
|
|
|
@@ -77,12 +83,15 @@ class RemoteUrl(ContentInterface):
|
|
|
77
83
|
|
|
78
84
|
return self.responses
|
|
79
85
|
|
|
80
|
-
def get_response(self):
|
|
86
|
+
def get_response(self, stream=None):
|
|
81
87
|
"""Provides URL response"""
|
|
82
88
|
responses = self.get_responses()
|
|
83
89
|
if not responses:
|
|
84
90
|
return
|
|
85
91
|
|
|
92
|
+
if stream:
|
|
93
|
+
responses[stream]
|
|
94
|
+
|
|
86
95
|
return RemoteServer.get_response(self.all_properties)
|
|
87
96
|
|
|
88
97
|
def get_text(self):
|
|
@@ -45,8 +45,8 @@ HTTP_STATUS_CODE_TIMEOUT = 604 # web page access timeout
|
|
|
45
45
|
HTTP_STATUS_CODE_FILE_TOO_BIG = 612
|
|
46
46
|
HTTP_STATUS_CODE_PAGE_UNSUPPORTED = 613
|
|
47
47
|
HTTP_STATUS_CODE_SERVER_ERROR = 614
|
|
48
|
-
HTTP_STATUS_CODE_SERVER_TOO_MANY_REQUESTS = 615 # this server too many requests
|
|
49
|
-
HTTP_STATUS_CODE_SERVER_DATA_NOT_READY = 616
|
|
48
|
+
HTTP_STATUS_CODE_SERVER_TOO_MANY_REQUESTS = 615 # this server too many requests, does not accept new
|
|
49
|
+
HTTP_STATUS_CODE_SERVER_DATA_NOT_READY = 616 # we do not want to keep connections too long. Return not ready. Client can continue
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
def status_code_to_text(status_code):
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|