Seite 1 von 3
					
				problem bei imdb suche
				Verfasst: Di 9. Jan 2007, 22:50
				von Evenfall
				hi,
habe da ein prob, hab die aktuelle version installiert und wenn ich über imdb en film suche und klick den an, fügt der mir die schauspieler nicht dazu und den Regisseur au nicht 
woran liegt dat
 
			 
			
					
				Re: problem bei imdb suche
				Verfasst: Di 9. Jan 2007, 22:52
				von der-domi
				
			 
			
					
				
				Verfasst: Di 9. Jan 2007, 22:55
				von Butzemann
				datei mal downloaden, entpacken und ersetzen:
http://blog-plus.de/Uploads/class.import.zip 
			 
			
					
				
				Verfasst: Di 9. Jan 2007, 22:59
				von Evenfall
				in dem thread war ich schon diw download gehen nicht bzw wenn ichs entpacken will "kein archiv"
und das ersetzen hat leider nix gebracht 

 
			 
			
					
				
				Verfasst: Mi 10. Jan 2007, 10:22
				von Nasenmann72
				Tachchen,
habe mich dem Problem des Imports der Schauspieler/Regisseure angenommen und die classes.import.php angepasst.
Ob meine Lösung die optimale ist, kann ich nicht sagen. Aber sie funktioniert...
Code: Alles auswählen
            // Regisseure
            $search = '<td nowrap><font face="Arial,Helvetica,sans-serif" size="2" class="Normal">Regie:';
            $this->buf1 = explode( $search, $this->siteBuf );
            $this->buf2 = explode( "</tr>", $this->buf1[1] );
            //$search = "<a href='view.php?page=liste&Name=";
            $search = "<a href=\"view.php?page=film_detail&fid=".$this->importID."\">";
            $this->buf1 = explode( $search, $this->buf2[0] );
            $this->buf1[1] = ltrim($this->buf1[1]);
            $this->buf1[1] = str_replace("<br>", ";", $this->buf1[1]); 
            $this->buf2 = explode ( ";</a>", $this->buf1[1]);
            $this->buf1 = explode ( ";", $this->buf2[0]);
            $this->varToImport['regisseure'] = array();
            for ( $i=1; $i<=count($this->buf1); ++$i ) {          
                $this->varToImport['regisseure'][$i-1] = $this->buf1[$i-1];
            }
            
            // Schauspieler
            $search = "<td nowrap><font face=\"Arial,Helvetica,sans-serif\" size=\"2\" class=\"Normal\">Darsteller:";
            $this->buf1 = explode( $search, $this->siteBuf );
            $this->buf2 = explode( "</tr>", $this->buf1[1] );
            //$search = "<a href='view.php?page=liste&Name=";
            $search = "<a href=\"view.php?page=film_detail&fid=".$this->importID."\">";
            $this->buf1 = explode( $search, $this->buf2[0] );
            $this->buf1[1] = ltrim($this->buf1[1]);
            $this->buf1[1] = str_replace("<br>", ";", $this->buf1[1]); 
            $this->buf2 = explode ( ";</a>", $this->buf1[1]);
            $this->buf1 = explode ( ";", $this->buf2[0]);
            $this->varToImport['actors'] = array();
            for ( $i=1; $i<=count($this->buf1); ++$i ) {          
                $this->varToImport['actors'][$i-1] = $this->buf1[$i-1];
            }
Schönen Tag noch,
Der Nasenmann
 
			 
			
					
				
				Verfasst: Mi 10. Jan 2007, 10:52
				von Nasenmann72
				Sorry, 
meine Lösung HAT funktioniert, bis gerade eben. 
Die bei ofdb.de haben anscheinend nochmal ihren HTML-Code geändert... 
Machen die das extra???
Viele Grüße,
Der Nasenmann
			 
			
					
				
				Verfasst: Mi 10. Jan 2007, 12:04
				von Nasenmann72
				And again...
Meine NEUE Lösung:
Code: Alles auswählen
            // Regisseure
            $search = '<td nowrap><font face="Arial,Helvetica,sans-serif" size="2" class="Normal">Regie:';
            $this->buf1 = explode( $search, $this->siteBuf );
            $this->buf2 = explode( "</tr>", $this->buf1[1] );            
            $this->buf2[0] = str_replace("</a>", ";", $this->buf2[0]); 
            $this->buf2[0] = str_replace(" ", "", $this->buf2[0]); 
            $this->buf2[0] = strip_tags($this->buf2[0]);
            $this->buf1 = explode ( ";", $this->buf2[0]);
            $this->varToImport['regisseure'] = array();
            for ( $i=1; $i<count($this->buf1); $i++ ) {         
                $this->varToImport['regisseure'][$i-1] = $this->buf1[$i-1];
            }
            
            // Schauspieler
            $search = "<td nowrap><font face=\"Arial,Helvetica,sans-serif\" size=\"2\" class=\"Normal\">Darsteller:";
            $this->buf1 = explode( $search, $this->siteBuf );
            $this->buf2 = explode( "</tr>", $this->buf1[1] );            
            $this->buf2[0] = str_replace("</a>", ";", $this->buf2[0]); 
            $this->buf2[0] = str_replace(" ", "", $this->buf2[0]); 
            $this->buf2[0] = strip_tags($this->buf2[0]);
            $this->buf1 = explode ( ";", $this->buf2[0]);
            $this->varToImport['actors'] = array();
            for ( $i=1; $i<count($this->buf1); $i++ ) {         
                $this->varToImport['actors'][$i-1] = $this->buf1[$i-1];
            }
 
			 
			
					
				
				Verfasst: Mi 10. Jan 2007, 15:28
				von Butzemann
				Yep, klappt wieder, danke dir. Hoffentlich macht der Sascha Imme (Projekt -und Entwicklungsleiter der OFDB) nicht nochmehr Veränderungen die den OFDB hack der Filmverwaltung betreffen  

 
			 
			
					
				
				Verfasst: Mi 10. Jan 2007, 16:59
				von cyprian
				kann ich nur bestätigen, geht wieder! das nervt ein bisschen, wenn ständig veränderungen vorgenommen werden! 
cyprian
 
			 
			
					
				
				Verfasst: Mi 10. Jan 2007, 21:13
				von Evenfall
				jep geht wieder wunderbar
gibts noch die möglichkeit das wegen der fsk eintragung und der filmlänge zu ändern das er das auch übernimmt?
danke auf jedenfall für die hilfe, freut mich das es wieder geht ^^
			 
			
					
				
				Verfasst: Do 11. Jan 2007, 23:10
				von der-domi
				Hier werde hier erst nachschauen und alles überprüfen, wenn ich weiß, dass sich nichts mehr ändert. Hat jemand dazu Informationen?
Um welche Werte handelt es sich denn genau? Es gibt ja viele kleine Fehler...
			 
			
					
				
				Verfasst: Fr 12. Jan 2007, 15:48
				von Butzemann
				Nasenmann72 hat geschrieben:And again...
Meine NEUE Lösung:
Code: Alles auswählen
            // Regisseure
            $search = '<td nowrap><font face="Arial,Helvetica,sans-serif" size="2" class="Normal">Regie:';
            $this->buf1 = explode( $search, $this->siteBuf );
            $this->buf2 = explode( "</tr>", $this->buf1[1] );            
            $this->buf2[0] = str_replace("</a>", ";", $this->buf2[0]); 
            $this->buf2[0] = str_replace(" ", "", $this->buf2[0]); 
            $this->buf2[0] = strip_tags($this->buf2[0]);
            $this->buf1 = explode ( ";", $this->buf2[0]);
            $this->varToImport['regisseure'] = array();
            for ( $i=1; $i<count($this->buf1); $i++ ) {         
                $this->varToImport['regisseure'][$i-1] = $this->buf1[$i-1];
            }
            
            // Schauspieler
            $search = "<td nowrap><font face="Arial,Helvetica,sans-serif" size="2" class="Normal">Darsteller:";
            $this->buf1 = explode( $search, $this->siteBuf );
            $this->buf2 = explode( "</tr>", $this->buf1[1] );            
            $this->buf2[0] = str_replace("</a>", ";", $this->buf2[0]); 
            $this->buf2[0] = str_replace(" ", "", $this->buf2[0]); 
            $this->buf2[0] = strip_tags($this->buf2[0]);
            $this->buf1 = explode ( ";", $this->buf2[0]);
            $this->varToImport['actors'] = array();
            for ( $i=1; $i<count($this->buf1); $i++ ) {         
                $this->varToImport['actors'][$i-1] = $this->buf1[$i-1];
            }
 
Aufgepasst!!! Die Daten der Schauspieler werden übernommen, aber auch der Link ...[mehr] steht jetzt immer am Ende. Also, wenn (wie ich schon im Gemeinschaftsforum gepostet habe 
http://www.gemeinschaftsforum.com/forum ... #msg546439 ) diese Zeile in der OFDB nicht weg gemacht wird, muss man eben, das jetzt immer zusätzlich löschen.
P.S. Hab den Sascha Imme (OFDB Head) mal dazu eine PN geschickt, mal sehen was kommt.
 
			 
			
					
				
				Verfasst: Mo 15. Jan 2007, 08:50
				von Nasenmann72
				Moin,
hier eine angepasste Version, die "...[mehr]" nicht mit übernimmt. Schöner wäre jedoch eine Funktion, die dem Link "[mehr] folgt und dort ALLE Schauspieler ausliest. Hab' ich momentan aber leider keine Zeit für... 
Viele Grüße,
Der Nasenmann
Code: Alles auswählen
            // Schauspieler
            $search = "<td nowrap><font face=\"Arial,Helvetica,sans-serif\" size=\"2\" class=\"Normal\">Darsteller:";
            $this->buf1 = explode( $search, $this->siteBuf );
            $this->buf2 = explode( "</tr>", $this->buf1[1] );
            $this->buf2[0] = str_replace("</a>", ";", $this->buf2[0]);
            $this->buf2[0] = str_replace(" ", "", $this->buf2[0]);
            $this->buf2[0] = strip_tags($this->buf2[0]);
            $this->buf1 = explode ( ";", $this->buf2[0]);
            $this->varToImport['actors'] = array();
            for ( $i=1; $i<count($this->buf1); $i++ ) {
            		if ($this->buf1[$i-1] != "...[mehr]") $this->varToImport['actors'][$i-1] = $this->buf1[$i-1];
            }
 
			 
			
					
				
				Verfasst: Mo 15. Jan 2007, 14:37
				von Butzemann
				Danke für deine Hilfe/Lösung.
Ähnlich diesem Problem ist es jetzt auch bei dem IMDB Import zu beobachten.
Hier wird das Produktionsland (bzw. auch Teile vom Quellcode) übernommen.
Ich hoffe auch dieses Problem kann gelöst werden.
			 
			
					
				
				Verfasst: Mo 15. Jan 2007, 16:36
				von Butzemann
				Hab hier ein Script in Perl gefunden. Vielleicht kann man das umsetzen:
	if($forced) {
		my (@cast, $tag, $person, $id, $role);
		my $parser = $self->_parser(FORCED);
	
		while($tag = $parser->get_tag('b')) {
			next unless (exists  $tag->[1]{class} and $tag->[1]{class} eq 'blackcatheader');
			last if $parser->get_text =~ /^(cast overview|credited cast|(?:series )?complete credited cast)/i;
		}
		
		while($tag = $parser->get_tag('a')) {
			last if $tag->[1]{href} =~ /fullcredits/i;
			#if($tag->[1]{href} && $tag->[1]{href} =~ m!/name/nm(\d+?)/!) {
			if($tag->[1]{href} && $tag->[1]{href} =~ m#(?<!tinyhead)/name/nm(\d+?)/#) {
				$person = $parser->get_text;
				$id = $1;	
				my $text = $parser->get_trimmed_text('a', '/tr');
				($role) = $text =~ /.*?\s+(.*)$/;			
				push @cast, {id => $id, name => $person, role => $role};
			}	
		}	
		
		$self->{_cast} = \@cast;
	}
	return $self->{_cast};
}