diff --git a/src/GoogleUrlTrait.php b/src/GoogleUrlTrait.php
index 7f3e2f3..2bf5cf4 100644
--- a/src/GoogleUrlTrait.php
+++ b/src/GoogleUrlTrait.php
@@ -16,14 +16,14 @@
trait GoogleUrlTrait
{
- public abstract function getParamValue($param, $defaultValue = null);
- public abstract function buildUrl();
- public abstract function getParamRawValue($param, $defaultValue = null);
- public abstract function getHost();
- public abstract function getPath();
- public abstract function getScheme();
- public abstract function getParams();
- public abstract function getHash();
+ abstract public function getParamValue($param, $defaultValue = null);
+ abstract public function buildUrl();
+ abstract public function getParamRawValue($param, $defaultValue = null);
+ abstract public function getHost();
+ abstract public function getPath();
+ abstract public function getScheme();
+ abstract public function getParams();
+ abstract public function getHash();
/**
* Get the number of the page, the pages are 1 indexed
diff --git a/src/Parser/Evaluated/NaturalParser.php b/src/Parser/Evaluated/NaturalParser.php
index 80add95..bc86dea 100644
--- a/src/Parser/Evaluated/NaturalParser.php
+++ b/src/Parser/Evaluated/NaturalParser.php
@@ -58,6 +58,6 @@ protected function generateRules()
*/
protected function getParsableItems(GoogleDom $googleDom)
{
- return $googleDom->xpathQuery("//div[@id = 'rso']/*");
+ return $googleDom->xpathQuery("//*[@id = 'rso']/*");
}
}
diff --git a/src/Parser/Evaluated/Rule/Natural/AnswerBox.php b/src/Parser/Evaluated/Rule/Natural/AnswerBox.php
index 69186b4..a274b33 100644
--- a/src/Parser/Evaluated/Rule/Natural/AnswerBox.php
+++ b/src/Parser/Evaluated/Rule/Natural/AnswerBox.php
@@ -37,6 +37,11 @@ protected function parseNode(GoogleDom $dom, \DOMElement $node)
// TODO ERROR
return;
}
+
+ if ($h3Tag = $dom->cssQuery('h3', $aTag)->item(0)) {
+ return $h3Tag->getNodeValue();
+ }
+
return $aTag->nodeValue;
},
'url' => function () use ($dom, $node) {
diff --git a/test/resources/pages-evaluated/2019/07/cheap+video+editing+software+mac.html b/test/resources/pages-evaluated/2019/07/cheap+video+editing+software+mac.html
new file mode 100644
index 0000000..09b57fd
--- /dev/null
+++ b/test/resources/pages-evaluated/2019/07/cheap+video+editing+software+mac.html
@@ -0,0 +1,296 @@
+
+
+
Jul 12, 2018 - Best free video editing software for Mac. iMovie. Apple's consumer focused video editing tool used to only be free if you bought a new Mac. DaVinci Resolve. If iMovie isn't for you, give DaVinci Resolve a try. Lightworks. OpenShot. Video Editor MovieMator. Final Cut Pro X. Adobe Premiere Pro CC. Adobe Premiere Elements ...
May 24, 2019 - If the potential cost of video-editing software is holding you back, then have no ... a list of the best free or cheap apps you can use on your Mac.
Jul 9, 2019 - Many people are looking of free Mac video editing software since they have tons of videos and are eager to edit the videos either for better ...
Jun 26, 2019 - Whether you need the very best video editing software out there or just a fantastic ... Platform: Windows/Mac | Free trial: 7 days | Upload straight to YouTube: ... This kind of power doesn't come cheap and the monthly or annual ...
Apr 4, 2019 - What's the best free video editor for Mac? Here's a list of 8 good candidates. Read the article and find out which movie maker suits you the most ...
The best video editing software for Mac is Final Cut Pro. It is an Apple product designed to harness the power Mac computers for speedy and flawless editing.
People also ask
What is the easiest video editing software for Mac?
How do I edit videos on my Mac for free?
What is the best free video editing software for beginners?
What is the easiest to use video editing software?
Jun 5, 2019 - ... easy to use. Here's how the best video editing software stacks up. ... Of course, if you use a Mac, the excellent iMovie comes with it. For PC ...
Jan 8, 2019 - Here is the best video editing software for Mac - discover the top free and paid video editors, including iMovie, Final Pro Cut X, Adobe Premiere, ...
diff --git a/test/suites/Parser/Evaluated/natural-parser-data/2019/07/cheap+video+editing+software+mac.yml b/test/suites/Parser/Evaluated/natural-parser-data/2019/07/cheap+video+editing+software+mac.yml
new file mode 100644
index 0000000..20cd0e2
--- /dev/null
+++ b/test/suites/Parser/Evaluated/natural-parser-data/2019/07/cheap+video+editing+software+mac.yml
@@ -0,0 +1,83 @@
+url: https://www.google.co.uk/search?q=cheap+video+editing+software+mac+nantes
+file: test/resources/pages-evaluated/2019/07/cheap+video+editing+software+mac.html
+
+test-methods:
+ javascriptIsEvaluated: true
+ isMobile: false
+
+results:
+
+ - types:
+ - ANSWER_BOX
+
+ data:
+ title: Best video editing software for Mac - MacPaw
+
+
+ - types:
+ - CLASSICAL
+
+ data:
+ title: "Best video editing software for Mac - MacPaw"
+ url: https://macpaw.com/how-to/best-video-editing-software
+ destination: https://macpaw.com/how-to/best-video-editing-software
+ description: Jul 12, 2018 - Best free video editing software for Mac. iMovie. Apple's consumer focused video editing tool used to only be free if you bought a new Mac. DaVinci Resolve. If iMovie isn't for you, give DaVinci Resolve a try. Lightworks. OpenShot. Video Editor MovieMator. Final Cut Pro X. Adobe Premiere Pro CC. Adobe Premiere Elements ...
+
+
+ # TODO video group not parsed
+
+
+ - types:
+ - CLASSICAL
+
+ data:
+ title: "Best free or inexpensive Mac video editors: iMovie, Lightworks, and ..."
+ url: https://www.macworld.co.uk/feature/mac-software/mac-video-editors-3697211/
+ destination: https://www.macworld.co.uk › Features › Mac Software Features
+
+
+ - types:
+ - CLASSICAL
+
+ data:
+ title: Top 10 Best Free Video Editing Software for Mac Users [2019 Update]
+
+
+ - types:
+ - CLASSICAL
+
+
+ - types:
+ - CLASSICAL
+
+
+ - types:
+ - CLASSICAL
+
+
+ - types:
+ - CLASSICAL
+
+
+ - types:
+ - PEOPLE_ALSO_ASK
+
+
+ - types:
+ - CLASSICAL
+
+
+ - types:
+ - CLASSICAL
+
+
+related-searches:
+ - title: imovie video editing software mac
+ url: https://www.google.co.uk/search?gl=US&q=imovie+video+editing+software+mac&sa=X&ved=2ahUKEwjuuPWt3L7jAhVC-6wKHXVJAQ0Q1QIoAHoECAoQAQ
+ - title: video editing software for mac free download
+ - title: avidemux video editing software mac
+ - title: video editing software for old mac
+ - title: best video editing software for mac 2019
+ - title: editing videos on mac
+ - title: free video editing software mac no watermark
+ - title: final cut pro