You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whenever I try to run the program I get this error message occasionally. I suspect this means that puppeteer cannot find chrome. I have updated my singlefile.py file to include these lines:
fromsubprocessimportrunSINGLEFILE_BINARY_PATH="./node_modules/single-file/cli/single-file"CHROME_PATH="/opt/google/chrome/google-chrome"#Uncomment this and set your browser exe if it can't find yours.defaddQuotes(str):
return"\""+str.strip("\"") +"\""defdownload_page(url, cookies_path, output_path, output_name_template=""):
args= [
addQuotes(SINGLEFILE_BINARY_PATH),
#"--browser-executable-path=" + addQuotes(CHROME_PATH.strip("\"")), #Uncomment this and set your browser exe if it can't find yours."--browser-cookies-file="+addQuotes(cookies_path),
"--output-directory="+addQuotes(output_path),
addQuotes(url)
]
if(output_name_template!=""):
args.append("--filename-template="+addQuotes(output_name_template))
try:
run("node "+" ".join(args), shell=True)
exceptExceptionase:
print("Was not able to save the URL "+url+" using singlefile. The reported error was "+e.strerror)
if__name__=="__main__":
download_page("https://www.google.com/", "", "./output/test", "test.html")
(I changed the file location of the chrome bin)
after doing this I still get the error message. I don't know if I am doing anything wrong.
The text was updated successfully, but these errors were encountered:
Whenever I try to run the program I get this error message occasionally. I suspect this means that
puppeteer
cannot find chrome. I have updated mysinglefile.py
file to include these lines:(I changed the file location of the chrome bin)
after doing this I still get the error message. I don't know if I am doing anything wrong.
The text was updated successfully, but these errors were encountered: