Loading...

Web Scraping Using PHP - Parse IMDB.com Movies HTML

49,678 views

Loading...

Loading...

Transcript

The interactive transcript could not be loaded.

Loading...

Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on Feb 17, 2017

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:
https://www.patreon.com/posts/web-scr...

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 ) https://www.youtube.com/c/CleverTechi...

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

( Facebook ) https://www.facebook.com/CleverTechie/

( Twitter ) https://twitter.com/theclevertechie

Loading...

Advertisement
When autoplay is enabled, a suggested video will automatically play next.

Up next


to add this to Watch Later

Add to

Loading playlists...