9
9
10
10
11
11
class HeritrixJob :
12
- def write (self ):
12
+ def write (self ) -> None :
13
13
self .job_number = str (int (time .time ()))
14
14
path = self .job_path + self .job_number
15
15
if not os .path .exists (path ):
@@ -23,7 +23,7 @@ def write(self):
23
23
f .write (self .sampleXML )
24
24
# print beans_file_path+"crawler-beans.cxml"
25
25
26
- def launch_heritrix_job (self ):
26
+ def launch_heritrix_job (self ) -> None :
27
27
logging .basicConfig (level = logging .DEBUG )
28
28
print ('Launching Heritrix job' )
29
29
data = {"action" : "launch" }
@@ -36,7 +36,7 @@ def launch_heritrix_job(self):
36
36
config .heritrix_credentials_password ),
37
37
data = data , headers = headers , verify = False , stream = True )
38
38
39
- def build_heritrix_job (self ):
39
+ def build_heritrix_job (self ) -> None :
40
40
logging .basicConfig (level = logging .DEBUG )
41
41
print ('Building Heritrix job' )
42
42
data = {"action" : "build" }
@@ -49,7 +49,7 @@ def build_heritrix_job(self):
49
49
data = data , headers = headers ,
50
50
verify = False , stream = True )
51
51
52
- def __init__ (self , h_job_path , uris , depth = 1 ) :
52
+ def __init__ (self , h_job_path : str , uris : list , depth : int = 1 ) -> None :
53
53
self .job_path = h_job_path
54
54
self .sampleXML = '''<?xml version="1.0" encoding="UTF-8"?>
55
55
<!--
0 commit comments