Python Tutorials and Examples for Beginners
Best Practice to Python OpenDirector Add HTTP Request Header – Python Web Crawler Tutorial
To crawl a web page, we should add some http request headers to our crawler to simulate browser. We can use urllib.request.Request() to build a request object to add some headers to do it. Meanwhile, we also can use urllib.request.build_opener() to create an OpenDirector object to crawl a web page. In this tutorial, we will add some request headers to OpenDirector object to simulate browser.
Best Practice to Python Get User-Friendly File Size – Python File Operation
Best Practice to Python Copy and Move File – Python Shutil Tutorial
Fix PyMuPDF RuntimeError: cycle in page tree – Python PDF Operation
Best Practice to Python Extract Plain Text and HTML Text From PDF with PyMuPDF – Python PDF Operation
Fix Python TypeError: ‘str’ object is not callable – Python Tutorial
Best Pracice to Python Resize Images with Pillow – Python Tutorial
Resizing an image has three ways:To a fixed width and height, such as 1000*2000 to 512 * 512. The ratio of width and height usually is changed. To set width to a fixed value, the height is changed with ratio. To set height to a fixed value, the width is changed with ratio.In this tutorial, we will introduce you how to resize an image with these three situations.