diff options
Diffstat (limited to 'bridges/BundestagParteispendenBridge.php')
-rw-r--r-- | bridges/BundestagParteispendenBridge.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/bridges/BundestagParteispendenBridge.php b/bridges/BundestagParteispendenBridge.php index cdf398e8..773f9129 100644 --- a/bridges/BundestagParteispendenBridge.php +++ b/bridges/BundestagParteispendenBridge.php @@ -26,18 +26,16 @@ TMPL; https://www.bundestag.de/ajax/filterlist/de/parlament/praesidium/parteienfinanzierung/fundstellen50000/462002-462002 URI; // Get the main page - $html = getSimpleHTMLDOMCached($ajaxUri, self::CACHE_TIMEOUT) - or returnServerError('Could not request AJAX list.'); + $html = getSimpleHTMLDOMCached($ajaxUri, self::CACHE_TIMEOUT); // Build the URL from the first anchor element. The list is sorted by year, descending, so the first element is the current year. $firstAnchor = $html->find('a', 0) or returnServerError('Could not find the proper HTML element.'); - $url = 'https://www.bundestag.de' . $firstAnchor->href; + $url = $firstAnchor->href; // Get the actual page with the soft money donations - $html = getSimpleHTMLDOMCached($url, self::CACHE_TIMEOUT) - or returnServerError('Could not request ' . $url); + $html = getSimpleHTMLDOMCached($url, self::CACHE_TIMEOUT); $rows = $html->find('table.table > tbody > tr') or returnServerError('Could not find the proper HTML elements.'); |