Puppeteer generate PDF from HTML

puppeteer+chrome

In puppeteer generate pdf is possible using the special page.pdf() page method. This function generates a pdf document from html markup. Generating a pdf is currently only supported in Chrome headless! Generation pdf Save pdf Print media and screen media Display header, footer and page background Range pdf page Scale, sizes, landscape and margin pdf … Read more

Puppeteer timeout

puppeteer+chrome

Timeout sets the maximum timeout for a particular method or methods after which an error or exception will be thrown. Puppeteer timeout default Method setDefaultNavigationTimeout Method setDefaultTimeout Timeout property WaitUntil property Puppeteer timeout promise Puppeteer timeout default The default in puppeteer timeout is 30 seconds. To use custom timeouts, you can use the page.setDefaultNavigationTimeout () … Read more

Puppeteer use proxy

In puppeteer use proxy, as in Chrome, is carried out using the argument –proxy-server, which is specified when the browser starts: where server – domain name or ip-address proxy-server, port – port. Puppeteer use proxy Proxy protocols Proxy authentication Puppeteer use proxy Here is the full code where we demonstrate the use of proxy in … Read more

Telegram Bot on Python 3

Today we will create a simple telegram bot on python that can respond to our messages, interact with us, offering answer options in the form of buttons and process the result we selected by executing commands on the server. Work with Telegram Bot Api we will using the pyTelegramBotAPI (telebot) library written in Python. Create … Read more

Docker DNS problem

If you are having difficulty installing docker on CentOS 8, read this article. There was a need to build an image with the installation of dependencies for python. Dependencies are described in the requirements.txt file and must be pulled from the network. However, when building the image I received an error of the following form: … Read more

CentOS 8 extend LVM

Earlier we installed CentOS 8. But what if the disk size was not enough? Fortunately, this operating system uses LVM by default, and in this article we will use for example the CentOS 8 extend LVM partition. This procedure is practically no different from the actions in previous versions of this OS. Attention! Before you … Read more

CentOS 8 install Docker

Installing the CentOS 8 operating system itself was discussed earlier in this article. Docker on CentOS 8: installation error When trying to install Docker on Centos 8 from the official repository, I received the following error: The error is caused by the containerd.io dependency, which cannot be automatically installed from the repository. CentOS 8 install … Read more