In extension to my previous IMDb Scraping API in PHP, I have converted the code to ASP.net/C# based IMDb scraper. In my de facto development style, I have kept the code pretty simple and concise. For more details on the movie information it scraps, please refer to my previous post. I don’t have an IIS server running to demonstrate the code but it is functionally similar to my PHP Scraper API so you can test it on the link below. And above all... it’s FREE!!!
Test the Scraper API: http://lab.abhinayrathore.com/imdb/
Download C# Class file: http://lab.abhinayrathore.com/imdb/imdb_asp_csharp.htm
(Add this class file to your project and rename the namespace accordingly)
To convert this C# code to VB.net use this tool: http://www.developerfusion.com/tools/convert/csharp-to-vb/
Fork it on GitHub: https://github.com/abhinayrathore/ASP.NET-IMDb-Scraper
Download DLL file: http://lab.abhinayrathore.com/imdb/IMDb.dll
(Copy this DLL file to your project folder and add it to the project references)
How to use this class:
- Include the class on your ASP page.
- Instantiate the class: IMDb imdb = new IMDb("The Godfather", true);
(Second parameter is an optional Boolean value for scraping extra movie information.)
- Access the movie information using public variables: imdb.Id, imdb.Title etc.
It’s been a while since I worked on ASP.net, so if you have any improvements or suggestions, do let me know :)