From dac685b88719a280ab36a9210a0c3ee57e4fa3b0 Mon Sep 17 00:00:00 2001 From: somini Date: Sat, 2 Mar 2019 18:05:23 +0000 Subject: [PATCH] [ComboiosDePortugalBridge] Add new bridge (#1049) --- bridges/ComboiosDePortugalBridge.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 bridges/ComboiosDePortugalBridge.php diff --git a/bridges/ComboiosDePortugalBridge.php b/bridges/ComboiosDePortugalBridge.php new file mode 100644 index 00000000..4d82881f --- /dev/null +++ b/bridges/ComboiosDePortugalBridge.php @@ -0,0 +1,22 @@ +getURI() . '/consultar-horarios/avisos') + or returnServerError('Could not load content'); + + foreach($html->find('.warnings-table a') as $element) { + $item = array(); + + $item['title'] = $element->innertext; + $item['uri'] = self::BASE_URI . $element->href; + + $this->items[] = $item; + } + } +}