Эх сурвалжийг харах

Whine less on empty Kickass searches

Zachary Kotlarek 11 жил өмнө
parent
commit
d3ccdb83f9
1 өөрчлөгдсөн 8 нэмэгдсэн , 0 устгасан
  1. 8 0
      findTorrent.pl

+ 8 - 0
findTorrent.pl

@@ -687,6 +687,14 @@ foreach my $content (@html_content) {
 				next;
 				next;
 			}
 			}
 
 
+			# Skip empty results
+			if ($tds[1] =~ /\<h2\>Nothing found\!\<\/h2\>/i) {
+				if ($DEBUG) {
+					print STDERR "Skipping empty TD\n";
+				}
+				next;
+			}
+
 			# Find the torrent title
 			# Find the torrent title
 			my ($title) = $tds[1] =~ /\<a(?:\s+[^\>]*)?href\=\"[^\"]+\?title\=\[[^\]\"]+\]([^\"]+)\"/i;
 			my ($title) = $tds[1] =~ /\<a(?:\s+[^\>]*)?href\=\"[^\"]+\?title\=\[[^\]\"]+\]([^\"]+)\"/i;
 			if (!defined($title) || length($title) < 1) {
 			if (!defined($title) || length($title) < 1) {