Web Scraping Using PHP - Parse IMDB.com Movies HTML

Опубликовано: 07 Октябрь 2024
на канале: Clever Techie
82,184
893

Upgrade your Clever Techie learning experience:
  / clevertechie  

UPDATE! (9/13/19) New features and improvements for Clever Techie Patreons:

1. Download full source code with detailed comments - easy to learn and understand code
2. Weekly source code file updates by Clever Techie - every time I learn new things about a topic I will add it to the source file and let you know about the update - keep up with the latest coding technologies
3. Library of custom Clever Techie functions with descriptive, easy to understand comments - skyrocket coding productivity, code more efficiently by using Clever library of custom re-usable functions
4. Syntax code summary - memorize and review previously learned code faster
4. Organized file structure - access all Clever Techie lessons, source code, graphics, diagrams and cheat sheet from a single workspace - no more searching around for previously covered material and source code - save enormous amount of time and effort
5. Outline of topics the source file covers - fast review of all previously learned coding lessons
6. Access to all full HD 1080p videos with no ads
7. Console input examples - interactive examples that make it easier to understand and learn coding
8. Access to updated PHP Programming Book by Clever Techie
9. Early access to Clever Techie videos

Subscribe to Clever Techie patreon:
  / clevertechie  

`````````````````````````````````````````````````````````````````````````````````````````````

Using PHP and regular expressions, we're going to parse the movie content of IMDB.com and save all the data in one single array. Web scraping using regex can be very powerful and this video proves it. We account for empty elements by matching groups of HTML blocks, looping through the blocks of matched content and then matching single elements, if they're found from the block. This technique of matching content and web scraping can be used on just about any web site to parse out it's content.

`````````````````````````````````````````````````````````````````````````````````````````````
Hey guys, I'm now using Patreon to share improved and updated video lesson material. For a small fee you can access all the downloadable files from this lesson (source code, icons & graphics, cheat sheets) and everything else included in the video from the Patreon page. Additionally, you will get access to ALL Clever Techie videos in HD format with no ads. Thank you so much for supporting Clever Techie :)

Download this video's files here:
  / web-scraping-php-20819046  

This download (Patreon unlock) includes:
(PHP regex function source code, PHP regex screen shots, PHP regex cheat sheet)
+
( You also get access to ALL source code and any downloadable content of ALL Clever Techie videos, as well as access to ALL videos in HD 1080p quality format with all video ads removed! )

`````````````````````````````````````````````````````````````````````````````````````````````
In this web scraping tutorial we’re going to be using regular expressions to parse HTML. This is a more advanced tutorial so you can check out my video on regular expressions before going through this. We’re going to be parsing out the IMDb website, which is an Internet movie database, and I’m going to be using a website called www.regex101.com to test regular expressions against strings to make sure we’re matching them correctly. Because this is an advanced tutorial, I’ll be posting each portion of code and explaining how it works as we walk through it. Directly below is the full source code, but skip down further and I'll walk through each portion of the code.

`````````````````````````````````````````````````````````````````````````````````````````````
( Website ) https://clevertechie.com - PHP, JavaScript, Wordpress, CSS, and HTML tutorials in video and text format with cool looking graphics and diagrams.

( YouTube Channel )    / clevertechietube  

( Google Plus ) https://goo.gl/J71p6f - clever techie video tutorials.

( Facebook )   / clevertechie  

( Twitter )   / theclevertechie