Commit 257f451c authored by Jérome Perrin's avatar Jérome Perrin

software/jscrawler: port to python3

parent 708776c2
...@@ -16,9 +16,6 @@ parts = ...@@ -16,9 +16,6 @@ parts =
jscrawler-build jscrawler-build
instance instance
[python]
part = python2.7
[nodejs] [nodejs]
<= nodejs-12.18.3 <= nodejs-12.18.3
......
...@@ -26,8 +26,7 @@ ...@@ -26,8 +26,7 @@
############################################################################## ##############################################################################
import os import os
import logging from urllib.parse import urlparse
from six.moves.urllib.parse import urlparse
import requests import requests
import time import time
...@@ -51,7 +50,7 @@ class TestJSCrawler(SlapOSInstanceTestCase): ...@@ -51,7 +50,7 @@ class TestJSCrawler(SlapOSInstanceTestCase):
self.send_response(200) self.send_response(200)
self.send_header("Content-Type", "application/html") self.send_header("Content-Type", "application/html")
self.end_headers() self.end_headers()
self.wfile.write('<title>Hello {}</title>'.format(self._name)) self.wfile.write(f'<title>Hello {self._name}</title>'.encode())
return { return {
'urls': '\n'.join([ 'urls': '\n'.join([
......
...@@ -24,6 +24,7 @@ extra = ...@@ -24,6 +24,7 @@ extra =
html5as-base ${slapos.test.html5as-base-setup:setup} html5as-base ${slapos.test.html5as-base-setup:setup}
htmlvalidatorserver ${slapos.test.htmlvalidatorserver-setup:setup} htmlvalidatorserver ${slapos.test.htmlvalidatorserver-setup:setup}
hugo ${slapos.test.hugo-setup:setup} hugo ${slapos.test.hugo-setup:setup}
jscrawler ${slapos.test.jscrawler-setup:setup}
jstestnode ${slapos.test.jstestnode-setup:setup} jstestnode ${slapos.test.jstestnode-setup:setup}
jupyter ${slapos.test.jupyter-setup:setup} jupyter ${slapos.test.jupyter-setup:setup}
kvm ${slapos.test.kvm-setup:setup} kvm ${slapos.test.kvm-setup:setup}
......
...@@ -370,7 +370,6 @@ extra = ...@@ -370,7 +370,6 @@ extra =
cloudooo ${slapos.test.cloudooo-setup:setup} cloudooo ${slapos.test.cloudooo-setup:setup}
dream ${slapos.test.dream-setup:setup} dream ${slapos.test.dream-setup:setup}
gitlab ${slapos.test.gitlab-setup:setup} gitlab ${slapos.test.gitlab-setup:setup}
jscrawler ${slapos.test.jscrawler-setup:setup}
re6stnet ${slapos.test.re6stnet-setup:setup} re6stnet ${slapos.test.re6stnet-setup:setup}
slapos-master ${slapos.test.slapos-master-setup:setup} slapos-master ${slapos.test.slapos-master-setup:setup}
slaprunner ${slapos.test.slaprunner-setup:setup} slaprunner ${slapos.test.slaprunner-setup:setup}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment