Einzelnen Beitrag anzeigen

PiLoT

Registriert seit: 25. Jan 2011
10 Beiträge
 
#7

AW: Über Google Images Cover für FIlmsammlung suchen und speichern

  Alt 10. Feb 2011, 17:49
Hallo ich habe mich nach ner API für images totgesucht

nun hab ich mich was in RegExprClass eingearbeitet nur irgendwie komme ich da mit der suchstring syntax net so ganz klar

also ich suche nach nem image bei google images dann hau ich das innen string und lasse

[.]+jpg"

durchlaufen

Code:
function ExtractEmails (const AInputString : string;const suchstring:string) : string;

// Note: compilation of r.e. performed during Expression assignment
// take some time, so if You will use this function many times
// it will be useless overhead.
// You can significant optimize this if You will create TRegExpr
// and precompile expression during programm initialization.

 var
  r : TRegExpr;
 begin
  Result := '';

  r := TRegExpr.Create;
  // Create the object instance.
  // Please, don't forget that - 10% of all 'bug-reports' to me caused
  // by attempts to use object without creation of it!

  try // ensure memory clean-up
     r.Expression := suchstring;
     // Assign r.e. source code. It will be compiled when nessesary
     // (for example when Exec called). If there are errors in r.e.
     // run-time execption will be raised during r.e. compilation
     if r.Exec (AInputString) then
      REPEAT
// #13 für neue Linie
       Result := result + r.Match [0]+ #13;
      UNTIL not r.ExecNext;
    finally r.Free;
   end;
 end;
so nun bekomme ich zumindest die richtige anzahl an ergebnissen zurück soviel wie google suchergenisse zurück wirft
aber bekomme ja nur das .jpg" zurückgeworfen als ergebniss

nun meine frage kann mir da mal jemand helfen was ich vor dem [.]+jpg" werfen muß das ich dann

Code:
s\x3d1","","25mv_hgnYJwN3M:","http://1.bp.blogspot.com/_VQBwLRjMRgE/SmsgS4mAnHI/AAAAAAAAADQ/AWTTfquHbss/s1600/tron_legacy-2.jpg","146","80",
"http://und zeichen die in einer url erlaubt sind und .jpg" bekomme so das es ne direkte url zum bild kommt ???

Ich gebe fast aus weil ich schon stundenlang dran rumgetüftelt habe und nicht drauf komme

Vielen Dank schon mal im vorraus

PiLoT

Geändert von PiLoT (10. Feb 2011 um 17:55 Uhr)
  Mit Zitat antworten Zitat