Код Python:
Код: Выделить всё
url = 'https://support.abc.com/hc...'
html_content = fetch_content(url)
if html_content:
text_content = html_to_text(html_content.decode('utf-8'))
# Output directory and file name
output_pdf_file = os.path.join('output', 'output.pdf')
if not os.path.exists('output'):
os.makedirs('output')
save_text_to_pdf(text_content, output_pdf_file)
print(f'PDF saved to {output_pdf_file}')
Код: Выделить всё
Error fetching https://support.abc.com/hc....: HTTP Error 403: Forbidden
Подробнее здесь: https://stackoverflow.com/questions/785 ... in-zendesk