Do It Yourself – Tutorials – How to Make a web scraper Pascal Lazarus Tutorial Pt3 – HTTPClient Requests GET HTML final

by | Oct 20, 2020 | 0 comments

Do It Yourself – Tutorials – How to Make a web scraper Pascal Lazarus Tutorial Pt3 – HTTPClient Requests GET HTML final

by | Oct 20, 2020 | Do It Yourself - Build Your Own Website | 0 comments

Do It Yourself – Website Tutorials



Part 3 – Now we get into the meat of writing the Free Pascal code in the IDE. If you’ve used Delphi or Object Pascal in the past, this will look very familiar.

We will download the OpenSSL DLL files (for Windows Users), and call to those libraries in our source under the ‘uses’ section.

Next we write a function calling the fphttpclient library so we can make a request to the website and grab the source code.

We will then be able to view the source code in the IDE’s console window (For Linux & Mac users), or in a message dialog if you’re a Windows user.

This will get us primed for the next step which will be to extract the image links out for loading into the image component in the GUI.

*************

How to scrape images from a web page? Watch me as I create a simple web scraper desktop application using Free Open Source – Code Typhon Studio 7.2 which is based on Lazarus IDE.

Using this powerful IDE, watch me code in free pascal and see how easy it is to create a web scraper from scratch and effortlessly create the GUI with the IDE’s built in drag and drop GUI Designer.

I’ll show you that web scraping is not just for Python, Javascript, PHP etc. And unlike those scripting languages, we can build a native executable file that can be cross-compiled for many different platforms including Windows, MacOS, and Linux straight from your own OS.

Download Code Typhon from Pilotlogic.com
https://www.pilotlogic.com/sitejoom/index.php/downloads/download/14-codetyphon/123-codetyphonins-zip.html

— Optional Alternatives —

Or if you prefer Lazarus IDE instead, install the Trunk version with FPCupDeluxe…
https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases

Lazarus Website
https://www.lazarus-ide.org/

———————————-

OpenSSL Libraries for Windows users:
https://indy.fulgan.com/SSL/Archive/Experimental/

My custom user scheme for the code editor.
https://github.com/goHighMarketing/CT-Pic-Grabber/blob/main/JacksCustom-userschemes.zip

source