Zachary Kotlarek 12 лет назад
Родитель
Сommit
f3ac90c61b
1 измененных файлов с 7 добавлено и 4 удалено
  1. 7 4
      findTorrent.pl

+ 7 - 4
findTorrent.pl

@@ -893,11 +893,14 @@ foreach my $content (@html_content) {
 			my ($fileSeason, $episode) = findSE($title);
 
 			# Extract the size
-			my ($size, $unit) = $dl =~ /\<span class\=\"s\">(\d+(?:\.\d+)?) (G|M)B\<\/span\>/i;
-			if ($unit eq 'G') {
-				$size *= 1024;
+			my $size = 0;
+			if ($dl =~ /\<span class\=\"s\">(\d+(?:\.\d+)?) (G|M)B\<\/span\>/i) {
+				$size = $1;
+				if ($2 eq 'G') {
+					$size *= 1024;
+				}
+				$size = int($size);
 			}
-			$size = int($size);
 
 			# Count the sum of seeders and leachers
 			my $seeds = 0;