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 :)
Nice stuff, cool thing that you're constantly improving your projects
ReplyDeleteThis is cool man ..
ReplyDeleteHi there i have downloaded your csharp class and converted it to vb.net. when i load the class it errors on 'HttpContext.Current.Server.UrlEncode(MovieName)'
ReplyDeletehttpcontext not defined.
Was wondering what im supposted to define it as?
Thanks
Try adding a reference to System.Web in your project or use System.Web.HttpContext.Current.Server.UrlEncode(MovieName);
ReplyDeleteI guess you are getting this error because your project is not a "web application" project in Visual Studio.
please send me csharp class and dll at my mail id kapil.soni99@gmail.com
Deletethanks i will try today.
ReplyDeleteFound some code that converts strings into url form to replicate what the system.web.httpcontext does with web apps.
ReplyDeletethanks for you help and the source code much appreciated.
Wow!!! Amazing!!!
ReplyDeleteIt works fast!
Say.... Do You have something like this but on the cast screen(cast, director, etc.)?
Very nice :) If only I would have found this sooner as I made my own from scratch!
ReplyDeleteIm having a little trouble using your imdb class/dll in a vs2010 winforms project, (im working on a personal movie database) and i was using a previous imdbservice (http://imdb.codeplex.com/) but with the new changes on the imdb webside it doesnt work anymore (at least not the scraping part, anyway, it still shows me the the matches, and i adapted your class to work with the first part of the old code, but im getting a problem now..
ReplyDeleteImagine that we have multiple matches in the treeview on one ur code searches every one of them, BUT when i research for another movie (repopulating my treeview object) your code doesnt works with the new IMDBid's... and i wonder why, executing code step by step, im getting the timeout at the (datastream = client.openread(url) Function) Code:
private string getUrlData(string url)
{
WebClient client = new WebClient();
Stream datastream = client.OpenRead(url);
StreamReader reader = new StreamReader(datastream);
StringBuilder sb = new StringBuilder();
while (!reader.EndOfStream)
sb.Append(reader.ReadLine());
client = null;
datastream.Flush();
reader.Close();
return sb.ToString();
}
as you can see i tried to close/reasign all object but that doesnt change anything
need help please
Mendor,
ReplyDeleteI didn't understand what new IMDb id's are you talking about. Can you give me some examples. As far as I know the id's are same.
This app is only designed to scrap the movie information page and not the IMDb search result page. For a quick search, I am using Google I'm Feeling Lucky feature. Using Google you only get one result back (best match).
The only important function you need in this library is parseIMDbPage. So you can modify the constructor according to your needs and link it directly to correct IMDb id url.
As for the getUrlData function, you can try using HttpWebRequest and HttpWebResponse classes: http://www.west-wind.com/presentations/dotnetwebrequest/dotnetwebrequest.htm
Thx but when i create a class (vs2010) and past your code it says: "The name 'HttpContext' does not exist in the current context" i have a reference to system.web, do you know how to fix this?
ReplyDeleteKay nevermind i fixet it with: HttpWebRequest httpreq = (HttpWebRequest)WebRequest.Create(MovieName);
ReplyDeletesorry to bother you again but how do i get the imdb.cast to a string? ( yea im still learing )
ReplyDeleteRobin,
ReplyDeleteYou can convert a C# ArrayList to a comma delimited string like this...
String.Join(",", imdb.Cast.ToArray())
Thank you so much!!
ReplyDeleteHi,
ReplyDeleteI'm using VB.Net with VS2010. I have a referece set to System.Web. I converted the code to VB using the link you suggested. I compile the program just fine but when I go to run it Visual Studio complains that the HttpContext.Current.Server.Urlencode(MovieName) returned NullReferenceExpection..Object reference not set to an instance of an object. Please let me know your thoughts as I'm stumped.
Thanks!
Hi you did a great job here!
ReplyDeletethanks!
Im having a little problem, the parseIMDbPage
i is hanging it just try to parse and stop responding all together
any help will be great!
Ian,
ReplyDeleteYou might be getting the Urlencode function error because your project is not a web application project. I guess you'll have to instantiate the HttpContext class in your code and then use it. You can even skip url encoding if you want to, it wont affect the results.
Enzima,
ReplyDeleteI am having no issues with this function on my side. I guess you'll have to use the debugger on your side and detect what part of the code is hanging.
If you find any bugs/flaws, do let me know, I'll update my code as well.
it is really hard to tell where it is even in debug.
ReplyDeletei wrote a console app and i have a list of movies i want to search for.
I start the application everything is good until stop responding.
no errors nothing.
i pause in debug mode and nothing. i can't find where it pause.. it really strange
i will continue debugging it if i find the issue i will let you know.
any help will be great
ok i find where it hang
ReplyDeleteHere
Year = match(@....
and this movie name: Puffo the Clown
http://www.imdb.com/character/ch0131222/
Hi,
ReplyDeleteI'm trying to the scraper work on series as well but I'm getting mixed results.
I'm scraping:
"Avatar the Last Airbender (#1.12) (TV)"
in both the compiled dll and the PHP scraper. PHP gives me the episode and the dll returns de series main page (and not the episode information).
What I'm I doing wrong?
Hi.
ReplyDeleteFirst of all...great work on the api. :)
Now to my problem...
I have a webform with a single textbox in which I want to display the title of the movie. I put the .cs file and the .dll file in the bin folder. When I start debugging the page opens, starts loading, but never opens.
Could you, please, tell me if I overlooked something?
Hi again.
ReplyDeleteI think I have figured out what is is wrong with the dll:
This piece needs is wrong:
//constructor
public IMDb(string MovieName, bool GetExtraInfo = true)
{
string url = "http://www.google.com/search?hl=en&btnI=I%27m+Feeling+Lucky&q=imdb+";
url += HttpContext.Current.Server.UrlEncode(MovieName);
string html = getUrlData(url);
parseIMDbPage(html, GetExtraInfo);
}
And needs to be like this:
//constructor
public IMDb(string MovieName, bool GetExtraInfo = true)
{
string url = "http://www.google.com/search?hl=en&q=imdb+";
url += HttpContext.Current.Server.UrlEncode(MovieName);
url += "&btnI=I%27m+Feeling+Lucky"
string html = getUrlData(url);
parseIMDbPage(html, GetExtraInfo);
}
This leads to tthe following problem :). Series title are scraped are scraped now but they are still in HTML format.
So:
""Avatar: The Last Airbender" The Storm"
Instead of:
""Avatar: The Last Airbender" The Storm"
I'm sure I can figure out how to deal with that but I could use your advice.
Sincerely,
Martien
PS. for those that have trouble with the "url += HttpUtility.UrlEncode(MovieName)" line read this:
http://stackoverflow.com/questions/4967051/why-cant-i-find-or-use-urlencode-in-visual-studio-2010
And if that doesn't work add "System.Web" to the project in the Solution Explorer, like this:
http://img716.imageshack.us/i/addreference.png/
Hi,
ReplyDeleteThank you so much for your great work on the api :)
I have a few problems here. Can I use this api in Windows Phone application? Because I cannot add a reference to System.Web since it's not a Windows Phone library.
Sincerely,
Veri
Veri,
ReplyDeleteSorry to say that I have never worked on a Windows Phone app, so I don't know much about it.
I would say try to find some way to get the html content from the IMDb page and I think the only other major dependency in this API if the regular expressions which I think should be there for the phone platform.
Thanks for This Bit of precious Code
ReplyDeleteIt will inspire me for a scraper for allmusic.com !
and a scraper for everything ....
need to scrap scrap scrap !!
Thanks man !
I am glad I found this before I dug into doing it myself.
ReplyDeleteGot it implemented fine.
For some reason, the MPAA Rating is often not scraped correctly.
Any change this is easy to fix?
Ian, can you please give me some sample titles where the MPAA rating is not scraped successfully. I'll try to look into it :)
ReplyDeleteHere are several where the MPAArating is wrong
ReplyDeleteSuper
A Better Life
Legend of the Fist: The Return of Chen Zhen
The Pruitt-Igoe Myth
Blue Crush 2
These have extra characters in the plot
Blue Crush 2
Black Cat Run
The approach to getting to the IMDB entry is ok but sometimes the selected movie is wrong (I didn't expect prefection)
For instance searching for Cat Run always returns the older movie Black Cat Run and a search for Arthur (to be released) always returns Arthur (from 1995)
Ian,
ReplyDeleteAll the movies that you have listed above don't have MPAA rating on the page (small image below the movie title). Compare these pages with other movie pages with MPAA rating to notice the difference.
Also, the title search is done using Google's "I'm feeling lucky" feature. So if it does not return the exact title, try searching with as much info as possible like adding movie year or actors in the search.
Is there a way to know that there is no Mpaa rating? Right now I get a string from somewhere else on the page.
ReplyDeleteI would love to add the year to the search but I don't have it.
Ian, thanks for pointing out the bug. I've fixed it and now you should get an empty string if there is no Mpaa rating on the page.
ReplyDelete(Get the latest version from the link above)
Thanks. I also improved my search for the correct movie by adding (currentyear OR lastyear) to the search. Since I am looking at Trailers that the dates are good guesses.
ReplyDeleteTried downloading the update but the date in the file hasn't changed. Where was the change in the code?
ReplyDeleteGo to the script page and hit refresh button.
ReplyDeleteGot it! Thanks
ReplyDeleteI added a couple of small changes
1. a do nothing constructor
2. a MovieLookup function that accomplishes what your constructor does and changed your contructor to call MovieLookUp
To get around the error with
ReplyDeleteHttpContext.Current.Server.UrlEncode(MovieName)
I used
url += HttpUtility.UrlEncode(MovieName);
I was wondering if you would consider scraping for the ReleaseDate?
ReplyDeleteAlso I noticed some extra text in the plot field. (example: Authur 2011). On the web page the plot comes up empty. the query returns "A drunken playboy stands to lose a wealthy inheritance when he falls for a woman his family doesn't like."
Sorry just realized the it is already there. For some reason I am not scraping it successfully. Will run a more comprehensive set of test and will communicate back. I am scraping Trailers so the IMDB page may not be complete. Thanks again for a very consise API.
ReplyDeleteI ran into an interesting movie that the scraper can't seem to locate
ReplyDeleteSquare Grouper The Godfathers of Ganja
The web scraper returns not found but the C++ scaper seems to hang
The scraper hangs when trying to get the Title. Since the ID is "", I just put a if ID == "" to exit the scraping before it gets into trouble.
ReplyDeleteNew Bing search doesn't find the correct entry for "Cooper and the Castle Hills Gang". Surprisingly, IMDB search returns only one choice and it is the correct one
ReplyDeleteI am not really satisfied with the search results from Bing. What about using the a google search with site:imdb.com?
ReplyDeleteIan,
ReplyDeleteI am working on converting the script to scrap Google Search results page to get the IMDb urls. Somehow Bing fails on some of the non-popular titles but Google search is definitely better at this job.
We'll keep scraping the Google Search result page until they stop automated script access to that as well.
Also, scraping the results from Search result page is more efficient as there is more probability of finding the url then using the "I'm feeling lucky" redirect.
P.S: I've already converted the PHP scraper to scrap Google, so you can give it a try :)
I noticed how you were scraping for the IMDB pages. Great Idea and should be robust.
ReplyDeleteHi Abhinay,
ReplyDeleteLike you I am looking into alternative's. DuckDuck go has a nice feature, can "!bang" search results, which allow you to use it to make use of the site specific search by using !imdb or !google.
Now I know the former isn't much help since, IMDb own search default search is less accurate that it's advanced search, which can't be "!banged" (It's actually a pretty solid search, but I can't come up with a way to verify that the first search result is the right one...).
But using it to search Google could give you an advantage perhaps...
If you come up with interesting result, do share. I shall do the same.
Martien
Modified the scraper to get IMDb url from Google Search Result page.
ReplyDeleteHey there,
ReplyDeleteI got this to work, and made it find the ID of a hard coded movie. But it takes about a minute.
Im in South Africa, line speed is 384kb, could that be an issue?
How long does it normally take?
Tx
Edit:
ReplyDeleteIt happens when it gets the info from imdb eg:
IMDb imdb = new IMDb("The Godfather");
Once that is retrieved, it using the data happens instant.
Ideas?
Is it possible to also scrape the country information? Liek for "The Dark Knight" -> USA/GB ? That would be nice!
ReplyDeleteCheerz, Michael
Ah nevermind, have it ;) just copied the genre variables and patch the code to match the country ;)
ReplyDeleteHey, thank you so much for this! it's a wonderful complement to my peronal project!
ReplyDeleteI have one huge problem that i'm trying to solve though. The IMDB title always comes in my mother language Portuguese (PORTUGAL) and i cannot seem to make it give me the titles in any language that i choose. I've tried to change the language on all my browsers and it still doesn't work. Is it getting the language from the computer or so? How can i change this? I tried looking at the code for any routine that i could change, but i can't seem to find it.
Thanks!
Inquisitor,
ReplyDeleteHere's your answer: http://www.imdb.com/help/show_leaf?akas
IMDb has a separate site for Portugal: http://www.imdb.pt
In the next version I'll try to include the feature to scrap AKAS titles as well.
This comment has been removed by the author.
ReplyDeleteHello Abhinay Rathore,
ReplyDeleteThanks for the quick reply! I'm sorry i didn't search enough, i thought it was not directly connected to IMDb. You're a genius for creating this, it works almost perfectly! I'm getting "trash" off of some words, mainly the ones translated to Portuguese, because of certain words (cão, for example, which means dog!) Also just realised that "" also come with trash (For example The Godfather's Storyline "...as "Don" Vito...") , must be missing something! I'll Sherlock Holmes it out!
Big thank you and best of luck!
How do I remove the ascii correctly?
ReplyDeleteimdb.Plot = imdb.Plot.Replace("'", "'");
I'm using this method.
It isn't very reliable, is there a better way?
This comment has been removed by the author.
ReplyDeleteWhat i did was i recovered the chars that belong to the coding of the letter and build a pseudo-library class that replaces my string according to those chars, so for example if its an é that is coming, it will appear in a specific code, this is the pattern for letters:
ReplyDelete&[char]acute;
[char] is replaced by the char you want, if its an é like i said before, then its e that you want there
Just notice a small issue with scaping of MPAA ratings. On IMDB, the ratings for PG-13 and NC-17 actually show up in the scraper as PG_13 and NC_17.
ReplyDeleteDoesn't Google ban us if we make loads of call using a automated script.
ReplyDeleteHi. Nice done, sir :)
ReplyDeleteBut, for some reason it only grabs the thumbnails of the "MediaImages"
That would be the 100x100 images that are shown on imdb. =/
Problem solved :)
ReplyDeleteI just changed: list.Add(m.Groups(1).Value) to
Dim s As String = m.Groups(1).Value.Substring(0, m.Groups(1).Value.IndexOf("_")) & "_V1._SX640_SY427_.jpg"
list.Add(s)
I've also added progress report and status report.
So you can get info about what being done and how far thou
the total process it is ( in % ) :)
is there anyway to automatically fetch the latest releases or upcoming movies instead of this searching stuff??
ReplyDeleteGitesh, this scraper is only meant to search and fetch movie information. You request is out of the scope for this scraper. You can write a similar scraper to get latest or upcoming movie list.
ReplyDeleteHi I cant do it work :(
ReplyDeleteSomeone can send me a c# 2008 sample with this class
Thanks
I get the following error at this line
ReplyDeleteStream datastream = client.OpenRead(url);
----------------------------------------------
{"No connection could be made because the target machine actively refused it 74.125.93.103:80"}
What am I doing wrong?
Hi, IMDB Rating is no longer grabbed. Any chance you can fix it?
ReplyDeleteFixed the Rating issue!
ReplyDeletehi, i can not get the votes, can u check it ???
ReplyDeleteFixed: Plot and Votes issue. Added random IP Address and User-Agent to Webclient request.
ReplyDeletehi,
ReplyDeletethanks for fixed.
but where did u fix it in this url:
_http://lab.abhinayrathore.com/imdb/imdb_asp_csharp_2.htm
I tried this class but its still missing votes and plot.
how about Languages, u want to add it in this class?
any solution for original title. Im living in Finland and the title always return in Finnish (I dont want that). How about convert all Title to English ???
Some specific Title can not display like: WALL·E. can you fix it, too...
I'm the first to admit I'm not a sophisticated code designer or coder, so please forgive me if the answer to this is "obvious", but when I try to compile the VB code, I get the following errors:
ReplyDeleteWarning 1 Resolved file has a bad image, no metadata, or is otherwise inaccessible. Could not load file or assembly 'C:\Users\Alan\Documents\Visual Studio 2008\Projects\imdbtest\imdbtest\IMDb.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
Warning 2 The referenced component 'IMDb' could not be found.
Error 3 Name 'imdb' is not declared. C:\Users\Alan\Documents\Visual Studio 2008\Projects\imdbtest\imdbtest\Form1.vb
Error 4 Type 'IMDb' is not defined. C:\Users\Alan\Documents\Visual Studio 2008\Projects\imdbtest\imdbtest\Form1.vb
Can someone tell me how to resolve this?
TIA...
hi again Abhinay, I want to add e lable to translate plot summery from English to another (for example Persian). how can I do if possible?
ReplyDeletehi, there is VOTES issue.
ReplyDeleteHello, I am having trouble making this work in VS 2008 as a C# Windows Form Application. I've saved the DLL to my project folder and added it as a project reference. The DLL appears in my solution explorer but with a yellow caution sign. I have added the I get the error "The referenced 'IMDb' component could not be found." Any help on how I can make this work as a Windows Application instead of an ASP.Net web page would be greatly appreciated. Thanks
ReplyDeleteJon
Abhinay. I have tracked down an issue with getUrlData.
ReplyDeleteThe error I am getting is "Exception: Unable to read data from the transport connection: The connection was closed."
I beleive the problem is caused by
Random r = new Random();
//Random IP Address
client.Headers["X-Forwarded-For"] = r.Next(0, 255) + "." + r.Next(0, 255) + "." + r.Next(0, 255) + "." + r.Next(0, 255);
//Random User-Agent
client.Headers["User-Agent"] = "Mozilla/" + r.Next(3, 5) + ".0 (Windows NT " + r.Next(3, 5) + "." + r.Next(0, 2) + "; rv:2.0.1) Gecko/20100101 Firefox/" + r.Next(3, 5) + "." + r.Next(0, 5) + "." + r.Next(0, 5);
Abhinay
ReplyDeleteJust one more small gotcha.
The MpaaRating for PG-13 and NC-17 come back as PG_13 and NC_17.
Thank you for this scraper, I would have spend many days getting this to work!!
ReplyDeleteI have a fix that look to be fixed in the online test but not in the code:
Plot = match(@"<_p itemprop=""description"">(.*?)" --> (|<a href)", html);
I have also tried a small change to see why it sometimes fails to get the movie from with the search engines or the imdb site, I think, but could be completely wrong, that it might have to do with invalid ip addresses. I have made the following change and will do some more testing.
Changes to the first octet in the ip address
int a1 = r.Next(1,254);
if (a1 == 10 || a1 == 127 || a1 == 169 || a1 == 172 || a1 == 192 || a1 == 224 || a1 == 240) a1++;
I also had to add a wrapper to fix html escaped characters in the fields: Title, OrigianlTitle, Plot, Storyline, and Tagline to fix these characters. Code below, I am not a good RegEx programmer so it probably could do with some of your finesse.
Regex regex = new Regex( @"\&\#x[0-9]{2};");
MatchCollection matches = regex.Matches(s);
foreach (Match match in matches)
{
s = s.Replace(match.Value, ((char)Convert.ToByte(match.Value.Replace(@"&#x", "").Replace(";", ""), 16)).ToString());
}
Once again, Many many thanks for this code.
Arvid
I have found a better way to fix up any encoded characters in the data fields, which works for all the other encoding's as well:
ReplyDeleteSystem.Net.WebUtility.HtmlDecode();
Arvid
I noticed inconsistent data being returned and tracked it down to the ip address used in the header for the download from imdb. I found some movies, like 'All She Can (2011)' would come down as 'Benavides Born' in Australia using a browser. So I changed the random picking of the first octet to one of the /8 ranges for USA and this looks to have fixed the issue.
ReplyDeleteint[] ipRangesUS = { 3, 6, 11, 13, 15, 16, 18, 20, 22, 26, 30, 33, 40, 48, 52, 56, 73 };
int a1 = ipRangesUS[r.Next(0, ipRangesUS.Length)];
Nice library, thanks.
ReplyDeleteHow to get italian image path?
imdb.Languages = ..
Where are you hosting your website for your FREE! ASP.net/C# IMDb Scraper ??? Because on my my hoster i cant run this code. Thanks for the information ...
ReplyDeleteHello Abhinay,
ReplyDeleteGreat scrapper my only question is why there is a need to have random IPs in a header?
Is it because imdb needs this header?
Abhinay
ReplyDeleteLOng time users of you imdb scraper class. Recently, the class as published in the C# listing doesn't seem to return the correct values. Although you demo page returns the correct data.
For instance for the movie Hammer of the Gods (2013)your web site demo returns the correct data but the C# code returns a release date of 2009 (instead of 2013) and a rating of 3.0 instead of ""
Take Care
It looks like IMDB changed their page layout in late November so the scraper may be partially broken.
ReplyDeleteFor instance the title field used to be IMDB - title. Now it is title - IMDB.
Abhinay
ReplyDeleteI ran into a unique issue this past week using the C# scraper. The movie involved is Ditch (2013).
The google serarch returns a page where Ditch (2013) is listed at the top of the page. Unfortuantely the scraper doesn't find a url on that page I am not sure I understand why it doesn't find the url (first problem). The scraper drops down through the other search engines and finally returns a search page result page where The Ditch (2010) is listed first. The fact that it returns the wrong movie is a problem but not the main issue here is that the regex that tries to locate the year hangs hard (second issue).
Take Care.
Year = match...
Take Care.
Abhinay
ReplyDeleteI saw you posted a new version. I am still crashing hard in the match subroutine called from this line
Year = match(@"<titl ....
The movie involved here is Top Gun
Hey Abhinay
ReplyDeleteProps to you for this awesome tool! It works perfectly!
Also thanks for keeping this up to date and for making improvements...with this last update everything runs 10x as fast!
Keep up the good work!
Grtz
Tnx for your class... It's great.
ReplyDeleteIt's the first time I heard of "Regex"... I managed to get IMDB search results in my program by dirty string manipulation... Now I want it to do the "Regex" way. But I can't figure out a working Regex string. Maybe u or someone can help me?
Grz.
Lone
Hi,
ReplyDeletehaving some troubles with your class...
Somehow once in while my program gets in a 'not responding state'.
If found out that the match function after : Rating = match("ratingValue"">(\d.\d)<", html) was giving me the problem.
I changed it in:
indexA = html.IndexOf("ratingValue"">", html.IndexOf("ratingValue"">") + 13) + 13 'second occurence
IndexB = html.IndexOf("<", indexA)
Rating = html.Substring(indexA, IndexB - indexA)
and the problem never occured again...
Do you have any clue?
Grz.
Lone
cast,writers,directors and stars not working properly. Appreciate if you can update it.
ReplyDeleteI am working on to fix all the issues right now. Stay tuned for some nice enhancements coming soon!
ReplyDeleteThe API is fixed now!
ReplyDeleteTHX for the fix!! I'm going to update now...
ReplyDeleteThanks Abhinay. I haven''t tried out the Feb 20 version yet but will do later tonight. I was able to get around my problem with getting the year by first triming the html to the text that contained the year then finding the year per your regex. This technique was used a few post up.
ReplyDeleteSeems that posters are not being retrieved and the Starring gives html chunks back...
ReplyDeleteThis comment has been removed by the author.
DeleteI got it working in WPF with vb.net but it's super slow. Sometimes it takes so long that it times out and crashes the application. I'm new to programming so I'm not sure what's causing it.
ReplyDelete:( i m not able to use this API
ReplyDeletei m using asp.net 3.5 and that DLL is not able to process and giving error as
Error 1 Could not load file or assembly 'IMDb' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
Hi,,
ReplyDeletewhen ever i search a movie using
var imdb = new IMDb("Cowboys & Aliens");
it results in a wrong movie info
Hello
ReplyDeleteI have noticed a small issue with the scraper. With the movie Monsters University (2013), the MPAA value from the scraper is "" but the movie actually has a MPAA of "G".
I looked at the imdb web page and the problem is that the parental rating is just listed as Certificate G. Perhaps because the movie is from the UK.
Abhinay,
ReplyDeleteOutstanding work! Thank you so much for the information.
I am currently using the IMDB class in C#. I saw a post up above on why the class returns the wrong movie sometimes. Here is a quick fix to that:
Add a text box for the movie and one for the year and the poll the IMDb class this way:
IMDb imdb = new IMDb("'"+ txt_Name.Text +"' " + txt_Year.Text, true);
This encapsulates the name in a single quote and adds the year on the end.
I digress, my original question is a bout the movie posters. How, in C# can I pull in the movie poster?
I have the variable imdb.Poster populating with a web address and I am unable to display the picture. Is there a way to capture this picture and either 1) display it from the webpage or 2) save it to the hard drive and display it from there?
Thanks in advance,
-Jeff
Never mind, found it. For future reference and if you are using C#:
Deletevar request = WebRequest.Create(imdb.Poster);
using (var response = request.GetResponse())
using (var stream = response.GetResponseStream())
{
pic_Cover.Image = Bitmap.FromStream(stream);
}
Add in:
Using System.Net;
pic_Cover is the name of the picture object I am using
-J
Very nice API! I have been using it for about 2 years. Why did you remove imdb.Stars? I was using it... :/
ReplyDeleteany way of adding progressbar when searching for movie
ReplyDeletehi all,
ReplyDeletei am pretty new to .net platform but interested in working on this scrapper.
can somebody save working project file ( vb.net or asp.net ) post a link for download.
i have used php scrapper and hugely modified for my website. http://www.clickcinema.in/
would love to start with .net platform and move to My-SQL DB at backend.
Regards'
Arun Kumar
Some movies (Monsters University for instance) use certification instead of MPAA rating.
ReplyDeleteI can't post the code because it is interpreted as html but you can model it after the MPAA line.
if (MpaaRating.Length == 0)
{
// If MPAA rating is not set check the Certification
MpaaRating = match(@"Certification: ***** certificates=us:g"">USA:(G|PG|PG-13|PG-14|R|NC-17|X)", html);
}
just replace the ****** with the html string to look for. Use Monsters University as an example
DeleteI have noticed and interesting problem. If you look for the movie Shepard & Dark, your test page returns the correct movie. WHen I use the C# version, Google returns the correct page and the movie is the first one listed but it doesn't locate the movie url. It eds up going onto BIng which doesn't return the correct movie.
ReplyDeleteIt is just what I was looking for, but my problem is: I work with Delphi. So, does anybory knows how to convert class file to Pascal/Delphi. I think DLL file will work fine.
ReplyDeleteThanks a lot.
Hi Abhinay Rathore,
ReplyDeleteI am not able to download class and dll . can you send me both things at my mail . this is my mail id : kapil.soni99@gmail.com. Please send me asap.
I am waiting..
Thanks
some movies don't work - example - tt3549656
ReplyDeleteFor those trying MPAA to get certifications...
ReplyDeleteReplace (in the class):
Public Property MpaaRating() As String
Get
Return m_MpaaRating
End Get
Set(Value As String)
m_MpaaRating = Value
End Set
End Property
Private m_MpaaRating As String
To:
Public Property MpaaRating() As ArrayList
Get
Return m_MpaaRating
End Get
Set(Value As ArrayList)
m_MpaaRating = Value
End Set
End Property
Private m_MpaaRating As ArrayList
And:
MpaaRating = match("contentRating*.?*.? (G|PG|PG-13|PG-14|R|NC-17|X) ", html)
To:
MpaaRating = matchAll("<0a.*?>(.*?)", match("Certification:.*?<0div class=""info-content"">(.*?)</0div", html))
(remove all the "0" from the line, was refused posting the comment)
Now a list of all certifications per country will be grabbed, use code to filter the one wanted.
Poster image displaying well on localhost but no image display after hosting on server.
ReplyDeleteAm I making any mistake?
dear the api is not fetching any result , when I call it in my asp.net age or asp mvc controller it's not given any error but no output.. check belwo
ReplyDeletepublic ActionResult Contact()
{
IMDb a = new IMDb("Dangal", true);
ViewBag.Message ="Director"+ a.Directors;
return View();
}
Very nice post here thanks for it .I always like and such a super contents of these post.Excellent and very cool idea and great content of different kinds of the valuable information's.
ReplyDeleteMachine learning training in chennai
machine learning with python course in Chennai
best training insitute for machine learning
Great efforts put it to find the list of articles which is very useful to know, Definitely will share the same to other forums.| Roles and reponsibilities of hadoop developer | hadoop developer skills Set | hadoop training course fees in chennai | Hadoop Training in Chennai Omr
ReplyDeleteNice Post
ReplyDeletedevops course in bangalore
best devops training in bangalore
Devops certification training in bangalore
devops training in bangalore
devops training institute in bangalore
Keep on sharing this post
ReplyDeleteaws course in Bangalore
aws training center in Bangalore
cloud computing courses in Bangalore
amazon web services training institutes in Bangalore
best cloud computing institute in Bangalore
cloud computing training in Bangalore
aws training in Bangalore
aws certification in Bangalore
best aws training in Bangalore
aws certification training in Bangalore
Nice post..
ReplyDeletesalesforce training in btm
salesforce admin training in btm
salesforce developer training in btm
Articles is very useful ....
ReplyDeleteblockchain training in Marathahalli
this blog is very helpful
ReplyDeletedigital marketing courses in Bangalore With placement
digital marketing training in Bangalore
seo training in Bangalore
Nice article thanks for sharing valuable information. Artificial Intelligence Training in Bangalore
ReplyDeleteHi, bro, IMDB changed their page structure and the C# code is not working now, Can you please fix it.
ReplyDeleteThanks for this blog. It is more Interesting...
ReplyDeleteCCNA Course in Coimbatore
CCNA Course in Coimbatore With Placement
CCNA Course in Madurai
Best CCNA Institute in Madurai
Java Training in Bangalore
Python Training in Bangalore
IELTS Coaching in Madurai
IELTS Coaching in Coimbatore
Java Training in Coimbatore
Phối chó bull pháp
ReplyDeletePhối giống chó Corgi
Phối chó Pug
Phối giống chó alaska
I regularly spend time reading your post and happy that this post has some valuable content in it.
ReplyDeleteIELTS Classes in Mumbai
IELTS Coaching in Mumbai
IELTS Mumbai
IELTS Center in Mumbai
Best IELTS Coaching in Mumbai
Spoken English Classes in Chennai
Spoken English Class in Chennai
Spoken English in Chennai
Thank you so much for sharing this informative blog
ReplyDeletedata science interview questions pdf
data science interview questions online
data science job interview questions and answers
data science interview questions and answers pdf online
frequently asked datascience interview questions
top 50 interview questions for data science
data science interview questions for freshers
data science interview questions
data science interview questions for beginners
data science interview questions and answers pdf
You may also see
ReplyDeletePMP Certification Advantages
<a href="https://vidmate.vin/
ReplyDelete
ReplyDeleteI recently visited your blog and it is a very impressive blog and you have got some interesting details in this post. Provide enough knowledge for me. Thank you for sharing the useful post and Well do...
Corporate Training in Chennai
Corporate Training institute in Chennai
Corporate Training in Chennai
Embedded System Course Chennai
Oracle DBA Training in Chennai
Linux Training in Chennai
job Openings in chennai
Oracle Training in Chennai
Power BI Training in Chennai
Corporate Training in Tambaram
get free apps on 9apps
ReplyDeletenice message
ReplyDeleteAmazon web services training in bangalore
best AWS Training institute in Bangalore
aws certification course in bangalore
devops training institutes in bangalore
devops certification course in bangalore
best training institute for data science in bangalore
data science classroom training in bangalore
best data science training institute in bangalore
data science with python training in bangalore
thanks for sharing useful information..
ReplyDeletePython training in Chennai/
Python training in OMR/
Python training in Velachery/
Python certification training in Chennai/
Python training fees in Chennai/
Python training with placement in Chennai/
Python training in Chennai with Placement/
Python course in Chennai/
Python Certification course in Chennai/
Python online training in Chennai/
Python training in Chennai Quora/
Best Python Training in Chennai/
Best Python training in OMR/
Best Python training in Velachery/
Best Python course in Chennai/
stripe quickbooks integration
ReplyDeleteI am very to visit your site.your sharing a blog was more informative and more interesting blog
ReplyDeletePython training in bangalore
This article is really great and helpful...
ReplyDeleteThanks for sharing a blog.
Python training in bangalore
Python training in Bangalore
Data science with python training in Bangalore
your post is very interesting to read. I never stop myself to say something about it.
ReplyDeletePython training in bangalore
Python training in Bangalore
Data science with python training in Bangalore
Angular js training in bangalore
Hadoop training in bangalore
DevOPs training in bangalore
Links that you have mention is not working. Please update it.
ReplyDeletelean Six Sigma Green Belt, Black Belt Training and consulting|
lean Six Sigma Green Belt Training at Hyderabad, Chennai|
lean management training|
lean Six Sigma Green Belt, Black Belt Training and consulting|
lean Six Sigma Green Belt, Black Belt Training and consulting
Find endorsed Motorola organization concentrates near you in . Find Location. You should enter your city to view Service Centers that are affirmed to fix your device.
ReplyDeleteBest mobile service centre.
Wikindly | Trending Female Celebrities Biographies
ReplyDeleteFemale Celebrities Biographies
Female Celebrities Biographies
Female Celebrities Biographies
Female Celebrities Biographies
Female Celebrities Biographies
Female Celebrities Biographies
Female Celebrities Biographies
Female Celebrities Biographies
Hi there,
ReplyDeleteVery useful article, thanks for sharing this post. Check this out
ISO 14001 Certification
Thanks for sharing valuable information.
ReplyDeleteDigital Marketing training Course in Chennai
digital marketing training institute in Chennai
digital marketing training in Chennai
digital marketing course in Chennai
digital marketing course training in omr
digital marketing certification in omr
digital marketing course training in velachery
digital marketing training center in Chennai
digital marketing courses with placement in Chennai
digital marketing certification in Chennai
digital marketing institute in Chennai
digital marketing certification course in Chennai
digital marketing course training in Chennai
Digital Marketing course in Chennai with placement
Nice information, valuable and excellent design, as share good stuff with good ideas and concepts, lots of great information and inspiration, both of which I need, thanks to offer such a helpful information here.
ReplyDeletedigital marketing course in chennai
digital marketing training in chennai
seo training in chennai
online digital marketing training
best marketing books
best marketing books for beginners
best marketing books for entrepreneurs
best marketing books in india
digital marketing course fees
high pr social bookmarking sites
high pr directory submission sites
best seo service in chennai
It's a looks very awesome article! Thanks a lot of sharing for information.
ReplyDeletepython training in hyderabad
Python Training in Bangalore
Python Training in Coimbatore
Python Training in Chennai
web designing course in bangalore
salesforce course in bangalore
Best Python Training in Bangalore
Python course in bangalore
python training in marathahalli
Python Classes in Bangalore
I must thank you for the efforts you have put in writing this blog. I am hoping to view the same high-grade content by you in the future as well. In fact, your creative writing abilities has encouraged me to get my very own website now ;)
ReplyDeleteTech news
Thanks for sharing such a great information..Its really nice and informative..
ReplyDeletesoftware testing training
Kingdomtoto situs judi togel yang setiap hari memberikan kemenangan dengan mudah. Kingdomtoto juga cocok sebagai bandar darat alternatif untuk bermain togel online. Untuk melihat hasil result pasaran togel juga bisa disini ya bos.
ReplyDeleteSitus yang sama kami refferensikan untuk anda yaitu kinghorsetoto. Situs paito warna terlengkap.
Awesome article, it was exceptionally helpful! I simply began in this and I'm becoming more acquainted with it better. The post is written in very a good manner and it contains many useful information for me. Thank you very much and will look for more postings from you.
ReplyDeletedigital marketing blog
digital marketing bloggers
digital marketing blogs
digital marketing blogs in india
digital marketing blog 2020
digital marketing blog sites
skartec's digital marketing blog
skartec's blog
digital marketing course
digital marketing course in chennai
digital marketing training
skartec digital marketing academy
Your style is very unique compared to other folks I've read stuff from. Many thanks for gadgets posting when you have the opportunity, Guess I will just bookmark this site.
ReplyDeleteVery nice :) If only I would have found this sooner as I made my own from scratch!
ReplyDeletepillow shams floral
accent pillow case baby
accent pillow case baby burlap
Study ExcelR Machine learning course bangalore where you get a great experience and better knowledge.
ReplyDeleteMachine learning course bangalore
Thanks for sharing this informations.
ReplyDeleteCCNA Course in Coimbatore
CCNA Training Institute in Coimbatore
Java training in coimbatore
Selenium Training in Coimbatore
Software Testing Course in Coimbatore
android training institutes in coimbatore
We offer the best bitcoin private key hack tools to spend non spendable funds in your blockchain wallet with ease. We are also here to assist you and make sure you get perfect results.
ReplyDeleteWe provide the tools if necessary at no cost and hope that you make donations to any charity of your choice in any area of your choice as appreciations.
Bitcoin Private key hack
Spend imported bitcoin addresses (NON-SPENDABLE)
Fake bitcoin transaction generator.
http://alturl.com/6ktgg
Get your private key recovered & earn a lot of hacking tips
BTC recovery tool, this tool is designed to hack any non-spendable
and get you the right private key so you can gain access to your
lost funds without any login details get this tool only on this site
and get your private key recovered & earn a lot of hacking tips
https://bit.ly/3aYAKma
How to recover a bitcoin private key
Looking for a bitcoin private key, unlock your funds non-spendable,
How to get free bitcoins, Fake bitcoin transaction, bitcoin mining software, you are in good hands.
OUR NEW SOFTWARE CAN RECOVER YOUR BITCOIN PRIVATE KEY! EASILY AND EFFICIENTLY.
https://bit.ly/2V6Iu0T
tripleonegk provide the best Current affair 2020 what is current affair ? any thing that is coming about in earth political events. things that act on the meeting, if need this visit our website and get best current affair 2020
ReplyDeleteGood job in presenting the correct content with the clear explanation. The content looks real with valid information. Good Work
ReplyDelete'CCC Service
AC Service in Chennai
Fridge Service in Chennai
Washing Machine Service in Chennai
LED LCD TV Service in Chennai
Microwave Oven Service in Chennai'
Thanks for the article. Its very useful. Keep sharing.
ReplyDeleteaws online training | aws online training chennai | aws training online
Thanks for giving great kind of informationOneyes Technologies
ReplyDeleteInplant Training in Chennai
Inplant Training in Chennai for CSE IT MCA
Inplant Training in Chennai ECE EEE EIE
Inplant Training in Chennai for Mechanical
Internship in Chennai
python training in bangalore | python olnine training
ReplyDeleteaws training in bangalore | aws online training
artificial intelligence training in bangalore | artificial intelligence online training
machine learning training in bangalore | machine learning online training
data science training in bangalore | data science online training
python training in bangalore | python olnine training
ReplyDeleteaws training in bangalore | aws online training
artificial intelligence training in bangalore | artificial intelligence online training
machine learning training in bangalore | machine learning online training
data science training in bangalore | data science online training
nice post. There is easy way to increase real usa instagram likes and followers which can help to boost your instagram and social media profile, here you can visit Buy Instagram Followers USA
ReplyDeleteThis article is really great and helpful...
ReplyDeleteThanks for sharing a blog. Looking for real active followers for instagram profile, then i would recommend to Buy Mumbai Instagram followers More details to Contact us + 917339876756
You really have a good heart, and very considerable of the situation we have, so thank you for some ideas.
ReplyDeleteCivil Service Aspirants
TNPSC Tutorial in English
TNPSC Tutorial in Tamil
TNPSC Notes in English
TNPSC Materials in English
tnpsc group 1 study materials
You can do very creative work in a particular field. Exceptional concept That was incredible share. Mr Robot Jacket
ReplyDeleteThank you very much for this great post.
ReplyDeletevalorant jacket
Eco-friendly Sustainable Hemp Products
ReplyDeleteEco-Friendly Hemp Clothing, Backpacks, Soaps, Pet Supplies, CBD Tinctures and Wellness Products
Shop Now
Shop Now
Shop Now
Shop Now
Shop Now
Shop Now
Shop Now
Shop Now
Shop Now
Shop Now
Shop Now
Shop Now
Shop Now
Shop Now
Shop Now
Shop Now
Shop Now
Eco-friendly Sustainable Hemp Products
ReplyDeleteEco-Friendly Hemp Clothing, Backpacks, Soaps, Pet Supplies, CBD Tinctures and Wellness Products
Shop Now
Shop Now
ReplyDeleteReally great post admin thanks for sharing this.
JioTV live for PC
Vivavideo for PC Download
Cartoon HD for PC Apk
Jio Fiber Register
Snapseed for PC
Whatsapp for laptop
Gret Content & Thanks For Sharing, But Do you Want to know about How To Make Money With Hostgator Affiliate Program
ReplyDeletegreat tips for aws we at SynergisticIT offer the best aws architect certification training in california
ReplyDeleteDrilling consultants
ReplyDeleteedumeet | python training in chennai
Organic Chemistry tutor
Visit Justincanvas | Best website to turn photo into painting
ReplyDeleteVisit Justincanvas Turn Photo to HandPainted Portrait
Visit Justincanvas | Best website to turn photo to oil painting on canvas
online learning management system software
ReplyDeletegoogle meet alternative
online student management system
school software
school management erp
Software IT Coaching Center in Chennai | Drilling consultants
ReplyDeleteI learn new information from your article; you are doing a great job. Keep it up
ReplyDeleteFSC Certification
Nice Article.. please kindly visit
ReplyDeleteWeb Development Company India
Android Application Development
SEO Company India
Social Media Optimization In India
IoT Training in Chennai
ReplyDeleteSuch a Nice article... Searching for cheap India based real instagram followers services, than best to Buy Instagram Followers India without any hassle. Buy real instagram followers India
ReplyDeletemongodb training in chennai
ReplyDeleteoracle training in chennai
cloud computing training in chennai
aws training in chennai
What an amazing post admin really great post thanks for this.
ReplyDeleteviva video for laptop
viva video lite for PC
snapseed for Mac PC
how to change background color using snapseed
play stored for PC download
cam scanner apk for PC
Thanks for sharing this amazing content. I really appreciate your hard work. Primavera Course in Chennai | primavera online training
ReplyDeleteThanks for sharing your knowledge with us, keep posting this kind of information.
ReplyDeleteWant to be a better programmer, then learn python training in bangalore
This comment has been removed by the author.
ReplyDeleteThanks for Sharing. Python Training in Chennai | Python Course in Chennai
ReplyDeleteGreat information. Thank you for sharing with us.
ReplyDeleteTamil romantic novels
Ramanichandran novels PDF
srikala novels PDF
Mallika manivannan novels PDF
muthulakshmi raghavan novels PDF
Infaa Alocious Novels PDF
N Seethalakshmi Novels PDF
Sashi Murali Tamil Novels
This is great collection of shotguns at British shooting show.
ReplyDeleteYankees Jacket
This was an extremely wonderful post. Thanks for providing this info. Leon The Professional Coat
ReplyDeleteReally nice post. Thank you for sharing amazing information.
ReplyDeleteClick this LINK
very nice.keep it up good work.The Leawo Total Media Converter 11.0.0.1 Crack 2022
ReplyDeletehello sir, This is a really good article. I recently discovered your blog. symptoms of sihr of separation.thank you Icecream PDF Split Merge Pro Crack
ReplyDeleteFind endorsed Motorola organization concentrates near you in . Find Location. You should enter your city to view Service Centers that are affirmed to fix your device.
ReplyDeleteclick here
Your post is based on the informative things. Your writing skills is really good. Keep on hardworking if you want to progress in the future. Also give us some more informative post. Thanks again for the great post. Cheers!
ReplyDeleteUpdated Version
Leawo Prof. Media is an amazing Post with good content.FIND CRACK is the best crack software site for all Mac and Windows users all over the world.
ReplyDelete
ReplyDeleteI’m glad that you just shared this helpful info with us. Please keep us informed like this.
Altair Inspire Keygen Studio
Thank you for sharing this post. Your post is very informative and interesting. Well done!
ReplyDeleteRekordbox DJ
very interesting to read. useful too. Python Training in Chennai
ReplyDeleteONLEI Technologies
Internship
Best Online Python Certification Course
Best Online Data Science Certification Course
Best Online Machine Learning Certification Course
Python Training
Machine Learning
Data Science
Digital Marketing
Thanks for giving useful information to all of us and please keep us updated in future also.For best career in Data Science & Data structure Join skillslash it is best online platform For learningCourses for more information click on our website links down.
ReplyDeleteDsa Best Course
Best System design course
Data Structures full course
Data science course fees in Bangalore