simonw/shot-scraper

weired pdf error

Aberta

#76 aberto em 20 de mai. de 2022

 (3 comentários) (0 reação) (0 responsável)Python (116 forks)github user discovery
bughelp wanted

Métricas do repositório

Stars
 (2.365 estrelas)
Métricas de merge de PR
 (Mesclagem média 1h 5m) (1 fundiu PR em 30d)

Description

url to pdf ERROR b'Traceback (most recent call last):\n File "/opt/hostedtoolcache/Python/3.10.4/x64/bin/shot-scraper", line 8, in \n sys.exit(cli())\n File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/click/core.py", line 1130, in call\n return self.main(*args, **kwargs)\n File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/click/core.py", line 1055, in main\n rv = self.invoke(ctx)\n File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/click/core.py", line 1657, in invoke\n return _process_result(sub_ctx.command.invoke(sub_ctx))\n File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/click/core.py", line 1404, in invoke\n return ctx.invoke(self.callback, **ctx.params)\n File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packages/click/core.py", line 760, in invoke\n return __callback(*args, **kwargs)\n File "/opt/hostedtoolcache/Python/3.10.4/x64/lib/python3.10/site-packag...

pdfname=url.split('/')[-1]

if not os.path.exists(join(pdfpath,pdfname+'.pdf')):
    cmd='shot-scraper pdf {url} -o {pdfname}.pdf'
    isdone=subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
    out, err = isdone.communicate()

Guia do colaborador