one error corrected by putting open under for loop
for download in downloadList: fileUrl = getAbsoluteURL(baseUrl,download["src"]) if fileUrl is not None: print(fileUrl) with open(fileUrl, 'wb', getDownloadPath(baseUrl, fileUrl, downloadDirectory)) as out_file: out_file.write(fileUrl.content)but now an another one appears
Error:http://pythonscraping.com/misc/jquery.js?v=1.4.4
Traceback (most recent call last):
File "C:\Python36\kodovi\crawler3.py", line 76, in <module>
with open(fileUrl, 'wb', getDownloadPath(baseUrl, fileUrl, downloadDirectory
)) as out_file:
TypeError: an integer is required (got type str)