Question

Retriving Imdb Info

Asked by: andre_carnevale

Im developing a tool for my video store and i want to retrieve cast , plot info , year , genre , votes , title , writen and directed by from a imdb url like : http://www.imdb.com/title/tt0145487/ ... thnx a lot

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2003-11-10 at 10:42:12ID20793404
Tags

imdb

Topic

Delphi Programming

Participating Experts
1
Points
140
Comments
19

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Retrive Info
    by mistake did a quick format on a hd, what is a good prog for retriving info off hd
  2. using cookies to stop multiple voting
    ok, I've read a few other questions regarding this subject, but still trying to figure it out. I think I would need the code to be either javascript or coldfusion, my polling app is designed with cf. now, on my main page I have a poll where visitors can vote on a single pol...
  3. Php mysql easy voting system.
    Hi, I've made website that stores all my movies, games, apps and so on. For example here's a the code for my dvd movies: $amount = mysql_query("SELECT * FROM data WHERE category='dvd'"); $num_rows = mysql_num_rows($amount); $querylatest = "SELECT date_forma...
  4. Retrive info and save as text file (FSO)
    Hi! Basic Outline of what i'm trying to do. I need to be able to retrive information from a SQL 2000 DB and then give an option to be able to save the field values as a Text file. I can connect to my db fine I am just unsure of using the FSO commands. If theres anything yo...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: EddieShipmanPosted on 2003-11-12 at 20:34:06ID: 9737191

You are asking a lot. It will take some time to parse the results from imdb pages
because they don't use a standardized format. Their html is junk. They use tables
for layout instead of CSS. I can do it for you but it will take some time or I can start you
off and you can work on the parsing yourself.

 

by: andre_carnevalePosted on 2003-11-13 at 07:01:02ID: 9739841

uhmmm if i can just have an ideia it would be great

 

by: EddieShipmanPosted on 2003-11-13 at 08:33:18ID: 9740727

Got a question. How are you going to be getting the URL's like the one above?
I am working on a utility to search using their Tsearch facility By Title) and am
having problems figuring something out.

 

by: EddieShipmanPosted on 2003-11-13 at 10:23:41ID: 9741477

OK, here's something to get you started. I used a component called extIEParser, available from the
Delphi-WebBrowser Yahoo group Files section, not sure if you have to be a member to download it
but if you aren't let me know via email and I'll send it to you.

The edit is the title to search for, I am the catcher in the oil field scene in "The Rookie", BTW.
Enter the title, click GO and then in the listbox, click the one you want to view.
Now I'm leaving the parsing of the results to you. I have an example where I modify the
'(more)' to 'Plot Summary' so you can see how to do it. If you have any more questions, let me know
and good luck...

DFM:
object Form1: TForm1
  Left = 316
  Top = 143
  Width = 870
  Height = 640
  Caption = 'Form1'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  OnCreate = FormCreate
  OnDestroy = FormDestroy
  PixelsPerInch = 96
  TextHeight = 13
  object ListBox1: TListBox
    Left = 0
    Top = 41
    Width = 288
    Height = 572
    Align = alLeft
    ItemHeight = 13
    TabOrder = 0
    OnClick = ListBox1Click
    OnMouseMove = ListBox1MouseMove
  end
  object Panel1: TPanel
    Left = 0
    Top = 0
    Width = 862
    Height = 41
    Align = alTop
    BevelOuter = bvNone
    TabOrder = 1
    object Edit1: TEdit
      Left = 16
      Top = 10
      Width = 201
      Height = 21
      TabOrder = 0
      Text = 'The Rookie'
    end
    object Button1: TButton
      Left = 232
      Top = 8
      Width = 75
      Height = 25
      Caption = 'GO'
      Default = True
      TabOrder = 1
      OnClick = Button1Click
    end
  end
  object Panel2: TPanel
    Left = 288
    Top = 41
    Width = 574
    Height = 572
    Align = alClient
    BevelInner = bvRaised
    BevelOuter = bvLowered
    Caption = 'Panel2'
    TabOrder = 2
    object WebBrowser1: TWebBrowser
      Left = 2
      Top = 2
      Width = 570
      Height = 568
      Align = alClient
      TabOrder = 0
      ControlData = {
        4C000000E93A0000B43A00000000000000000000000000000000000000000000
        000000004C000000000000000000000001000000E0D057007335CF11AE690800
        2B2E126208000000000000004C0000000114020000000000C000000000000046
        8000000000000000000000000000000000000000000000000000000000000000
        00000000000000000100000000000000000000000000000000000000}
    end
  end
  object IdHTTP1: TIdHTTP
    MaxLineAction = maException
    AllowCookies = True
    ProxyParams.BasicAuthentication = False
    ProxyParams.ProxyPort = 0
    Request.ContentLength = -1
    Request.ContentRangeEnd = 0
    Request.ContentRangeStart = 0
    Request.Accept = 'text/html, */*'
    Request.BasicAuthentication = False
    Request.UserAgent =
      'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.' +
      '4322)'
    HTTPOptions = [hoForceEncodeParams]
    Left = 776
    Top = 8
  end
  object extIEParser1: TextIEParser
    DownloadOnly = False
    DownloadOptions = [DLCTL_DOWNLOADONLY, DLCTL_NO_FRAMEDOWNLOAD, DLCTL_RESYNCHRONIZE, DLCTL_PRAGMA_NO_CACHE, DLCTL_NO_BEHAVIORS, DLCTL_OFFLINE]
    parseNoFrames = False
    OnAnchor = extIEParser1Anchor
    Left = 816
    Top = 8
  end
end

PAS:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, IdBaseComponent, IdComponent, IdTCPConnection,
  IdTCPClient, IdHTTP, OleCtrls, SHDocVw, extIEParser, ExtCtrls,Clipbrd ;

type
  TForm1 = class(TForm)
    IdHTTP1: TIdHTTP;
    extIEParser1: TextIEParser;
    ListBox1: TListBox;
    Panel1: TPanel;
    Edit1: TEdit;
    Button1: TButton;
    Panel2: TPanel;
    WebBrowser1: TWebBrowser;
    procedure Button1Click(Sender: TObject);
    procedure extIEParser1Anchor(Sender: TObject; href, target, rel, rev,
      urn, Methods, name, host, hostname, pathname, port, protocol, search,
      hash, accesskey, protocolLong, mimeType, nameProp: String;
      Element: TElementInfo);
    procedure FormDestroy(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure ListBox1Click(Sender: TObject);
    procedure ListBox1MouseMove(Sender: TObject; Shift: TShiftState; X,
      Y: Integer);
  private
    { Private declarations }
  public
    { Public declarations }
    slAnchorHrefs: TStringList;
  end;

var
  Form1: TForm1;

implementation

uses Unit2;

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
  src: TStringStream;
  x: Integer;
begin
  ListBox1.Items.Clear;
  src := TStringStream.Create('');
  WebBrowser1.Navigate('http://www.imdb.com/Tsearch?title='+ Edit1.Text+'&restrict=Movies+only');
  extIEParser1.Url := 'http://www.imdb.com/Tsearch?title='+ Edit1.Text+'&restrict=Movies+only';
  extIEParser1.Execute;
  for x := 0 to ListBox1.Items.Count-1 do
    if Pos(Edit1.Text, ListBox1.Items.Names[x]) > 0 then
      ShowMessage(ListBox1.Items.Values[ListBox1.Items.Names[x]]);
end;

procedure TForm1.extIEParser1Anchor(Sender: TObject; href, target, rel,
  rev, urn, Methods, name, host, hostname, pathname, port, protocol,
  search, hash, accesskey, protocolLong, mimeType, nameProp: String;
  Element: TElementInfo);
var
  LinkText: String;
begin
  if Trim(Element.outerText) = '' then
    LinkText := 'Unassigned'
  else
    LinkText := Element.outerText;
  if LinkText <> 'Unassigned' then
  begin
    if (LinkText = '(more)') and (Pos('plotsummary', href)> 0) then
      LinkText := 'Plot Summary';
    slAnchorHrefs.Add(href);
    ListBox1.Items.Add(LinkText);
  end;
end;

procedure TForm1.FormDestroy(Sender: TObject);
begin
  slAnchorHrefs.Free;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  slAnchorHrefs := TStringList.Create;
end;

procedure TForm1.ListBox1Click(Sender: TObject);
begin
  WebBrowser1.Navigate(slAnchorHrefs[ListBox1.ItemIndex]);
  extIEParser1.Url := slAnchorHrefs[ListBox1.ItemIndex];
  slAnchorHrefs.Clear;
  ListBox1.Items.Clear;
  extIEParser1.Execute;
end;

procedure TForm1.ListBox1MouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
var
   APoint : TPoint ;
   Index : Integer ;
   HW : THintWindow ;
   Rec : TRect ;
   sHint : String ;
begin
  APoint.X := X;
  APoint.Y := Y;

  Index := ListBox1.ItemAtPos(APoint, True);
  if Index >= 0 then
  begin
     HW := THintWindow.Create(nil);
     try
       GetCursorPos(APoint);
        sHint := slAnchorHrefs[Index];
        Rec.Top := APoint.Y + 20 ;
        Rec.Left := APoint.X ;
        Rec.Right := Rec.Left +
           HW.Canvas.TextWidth(sHint)+6;
        Rec.Bottom := Rec.Top +
           HW.Canvas.TextHeight(sHint)+4;
        HW.ActivateHint(Rec,sHint);
        HW.Refresh ;
        Sleep(400);
        HW.ReleaseHandle ;
     finally
        HW.Free ;
     end;
  end;
end;

end.

 

by: EddieShipmanPosted on 2003-11-13 at 10:25:22ID: 9741496

BTW, MAKE SURE you modify the Request.UserAgent for idHTTP as shown above because otherwise,
IMDB will give you a 403 Forbidden error. Seems too many peple have been accessing it using Indy
components...HA! HA!

 

by: andre_carnevalePosted on 2003-11-13 at 14:39:43ID: 9743443

where is extIEParser1: TextIEParser; located at delphi ??? if dont have where can i download it ???? thnx ... btw i will aceppt your ansmwer

 

by: EddieShipmanPosted on 2003-11-13 at 15:22:14ID: 9743715

GO to http://groups.yahoo.com/groups/delphi-webbrowser
Like I said, I'm not sure if you have to be a member to download it
but if you aren't let me know via email and I'll send it to you.

 

by: andre_carnevalePosted on 2003-11-13 at 15:39:19ID: 9743804

yeah i have to be a member to get it ;/
send it please to my emails
fuketa@terra.com.br
thank you veru much

 

by: EddieShipmanPosted on 2003-11-13 at 18:00:52ID: 9744538

On its way...

 

by: andre_carnevalePosted on 2003-11-14 at 13:43:18ID: 9751290

there is no way to compile it on delphi 6 ???

 

by: EddieShipmanPosted on 2003-11-14 at 20:20:29ID: 9752815

That is what I used, D6. what problem are you having?

 

by: andre_carnevalePosted on 2003-11-15 at 10:09:56ID: 9754772

say that i dont have this files
[Fatal Error] extIEParser.pas(17): File not found: 'mshtml_tlb.dcu'

 

by: EddieShipmanPosted on 2003-11-15 at 12:56:54ID: 9755486

Change mshtml_tlb in the uses clause to  to mshtml. It should then compile.

 

by: andre_carnevalePosted on 2003-11-15 at 13:56:05ID: 9756074

one problem solved other appear
[Fatal Error] extIEParserReg.pas(18): File not found: 'dsgnintf.dcu'

 

by: EddieShipmanPosted on 2003-11-17 at 06:29:02ID: 9763664

I will send you the extIEParserReg file I have...
It has installed fine on D6.

I added some events but did not finish the implementation,
OnTable, OnTR, OnTD.
The OnTable is good, the other two I have not finished.

 

by: andre_carnevalePosted on 2003-11-17 at 18:04:27ID: 9768393

tried to compile it and my delphi crashed again ... had to install it again (second time) ... tried to compile then it crash and delphi dont open anymore ;( .. know what can be causing this ?

 

by: EddieShipmanPosted on 2003-11-17 at 20:18:30ID: 9768847

Don't know, I had no problem installing it on D6 Pro.
Go ahead and import the MSHTML Type lib and change the uses clause back to mshtml2_tlb
and see if that helps.

 

by: EddieShipmanPosted on 2003-11-17 at 20:18:56ID: 9768849

I may just have to install it into a bpl of it's own and send it to you.

 

by: EddieShipmanPosted on 2003-11-19 at 07:25:00ID: 9779893

OK, I have the package ready for you, email me at
<< eMail removed

kretzschmar
Page Editor
>>
an I'll
send it to you.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...