Google backend: fix runtime and fsk parsing
authorPhilipp Zabel <philipp.zabel@gmail.com>
Tue, 23 Feb 2010 00:00:50 +0000 (01:00 +0100)
committerPhilipp Zabel <philipp.zabel@gmail.com>
Wed, 14 Jul 2010 21:34:08 +0000 (23:34 +0200)
src/backends/google/google-parser.vala

index 6254416..87c7676 100644 (file)
@@ -203,6 +203,7 @@ public class GoogleParser : Object {
                expect_tag ("/a");
                expect_tag ("/div");
                expect_tag ("span"); // class=info
+               string info_text = parse_text ().replace ("&#8206;", "");
                string[] runtime_and_fsk = {};
                double rating = 0.0;
                var tag = parse_tag ();
@@ -226,7 +227,7 @@ public class GoogleParser : Object {
                        expect_tag ("img");
                        expect_tag ("/nobr");
                        expect_tag ("/nobr");
-                       runtime_and_fsk = parse_text ().replace ("&#8206;", "").offset (3).split (" - ");
+                       info_text = parse_text ().replace ("&#8206;", "").offset (3);
                        if (parse_tag () == "a") {
                                // Trailer
                                expect_tag ("/a");
@@ -237,6 +238,7 @@ public class GoogleParser : Object {
                                }
                        }
                }
+               runtime_and_fsk = info_text.split (" - ");
                expect_tag ("div"); // class=times
                var showtimes = parse_text ().replace ("&nbsp;", ",");
                while (parse_tag () == "a") {