HeroldAustria changed the html code on their website again, I had to edit the
source-Herold_Austria.module (already updated on line 52)
<?php
/*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
* Developer Notes:
*
* There are two separate URLS for reverse searching, one for yellowpages one for ppl:
* http://www.herold.at/en/telefonbuch/telefon_$thenumber - people
* http://www.herold.at/en/gelbe-seiten/telefon_$thenumber - business
* I could only get reverse searches to work for ppl
*
* herold.at Terms of Service:
* As summarized in the post here on 2014-06-27
* https://github.com/POSSA/Caller-ID-Superfecta/issues/131#issuecomment-47354154
* herold.at TOS do not explicitly prohibit automated lookups
*
* Version History:
* 2014-06-28 Initial migration from 2.2.x
* 2014-07-02 Add business lookups and change urls to mobile site
* 2016-05-03 Rewrite Numbers correct for Herold and change Query for new Mobile Web Template
* 2017-03-20 Again Herold has a new Theme. We need to change the regexp again
* 2017-11-09 If the Caller ID is 'unknown', 'anonymous' or empty then skip the check
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***/
class Herold_Austria extends superfecta_base {
public $description;
public $version_requirement = "2.11";
public function __construct() {
$this->description = "https://www.herold.at/ - "._("These listings include data for Austria.");
}
function get_caller_id($thenumber, $run_param=array()) {
$this->DebugPrint(_("Searching"). "https://www.herold.at/ ... ");
if($thenumber !== 'anonymous' && $thenumber !== 'unknown' && $thenumber !== ''){
if (substr($thenumber, 0, 1) ==! '0') {
$thenumber=trim($thenumber,' ');
$thenumber="00" . $thenumber;
}
if (substr($thenumber, 0, 2) === '00') {
$thenumber=trim($thenumber,' ');
}
// Set the url we're searching for
$res_rul = "https://www.herold.at/telefonbuch/was_".$thenumber."/";// url for searching residential listings
$bus_url = "https://www.herold.at/gelbe-seiten/was_".$thenumber."/";// url for searching business listings
// regex patterns to search for
$regexp = array(
'~<h2><span itemprop="name">(.+?)</span>~',
);
// first search for Residential match
if ($this->SearchURL($res_rul, $regexp, $match)) {
$caller_id = $this->ExtractMatch($match);
}
// if no residential match found, search business
if ($this->SearchURL($bus_url, $regexp, $match)) {
$caller_id = $this->ExtractMatch($match);
}
$caller_id = isset($caller_id)?$caller_id:'';
return($caller_id);
}
}
}
line 52 I changed to '~<h2><span itemprop="name">(.+?)</span>~',
originally it was
'~<h2><a href=".*?" data-clickpos="name"><span itemprop="name">(.+?)</span>~',