From b8c41da3ed0563519dcc312af234810e6325021a Mon Sep 17 00:00:00 2001
From: markusbloch <>
Date: Sat, 4 Jan 2014 10:53:40 +0000
Subject: [PATCH] FB_CALLMONITOR: fixing reverse search for
klicktel.de/dasoertliche.de
git-svn-id: https://svn.fhem.de/fhem/trunk@4555 2b470e98-0d58-463d-a4d8-8e2adae1ed80
---
fhem/FHEM/72_FB_CALLMONITOR.pm | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/fhem/FHEM/72_FB_CALLMONITOR.pm b/fhem/FHEM/72_FB_CALLMONITOR.pm
index 408a29c2e..b66e9b6e8 100755
--- a/fhem/FHEM/72_FB_CALLMONITOR.pm
+++ b/fhem/FHEM/72_FB_CALLMONITOR.pm
@@ -167,7 +167,7 @@ if($arguments[1] eq "search")
else
{
- return "unknown argument, choose on of search";
+ return "unknown argument ".$arguments[1].", choose one of search";
}
@@ -406,7 +406,7 @@ if(AttrVal($name, "reverse-search", "none") eq "all" or AttrVal($name, "reverse-
else
{
- if($result =~ /(.+?)<\/a>/)
+ if($result =~ /1\. (.+?)<\/a>/)
{
$invert_match = $1;
$invert_match = FB_CALLMONITOR_html2txt($invert_match);
@@ -414,6 +414,10 @@ if(AttrVal($name, "reverse-search", "none") eq "all" or AttrVal($name, "reverse-
undef($result);
return $invert_match;
}
+ else
+ {
+ Log3 $name, 3, "FB_CALLMONITOR: the reverse search result for $number could not be extracted from klicktel.de. Please contact the FHEM community.";
+ }
}
}
@@ -436,7 +440,7 @@ if(AttrVal($name, "reverse-search", "none") eq "all" or AttrVal($name, "reverse-
else
{
#Log 2, $result;
- if($result =~ /getItemData\('.*?', '.*?', '.*?', '.*?', '.*?', '(.*?)', '.*?', '.*?', '.*?'\);/)
+ if($result =~ /(.+?)<\/span>/)
{
$invert_match = $1;
$invert_match = FB_CALLMONITOR_html2txt($invert_match);
@@ -444,6 +448,10 @@ if(AttrVal($name, "reverse-search", "none") eq "all" or AttrVal($name, "reverse-
undef($result);
return $invert_match;
}
+ else
+ {
+ Log3 $name, 3, "FB_CALLMONITOR: the reverse search result for $number could not be extracted from dasoertliche.de. Please contact the FHEM community.";
+ }
}
}
@@ -474,6 +482,10 @@ if(AttrVal($name, "reverse-search", "none") eq "search.ch")
undef($result);
return $invert_match;
}
+ else
+ {
+ Log3 $name, 3, "FB_CALLMONITOR: the reverse search result for $number could not be extracted from search.ch. Please contact the FHEM community.";
+ }
}
}
@@ -511,6 +523,10 @@ if(AttrVal($name, "reverse-search", "none") eq "dasschnelle.at")
undef($result);
return $invert_match;
}
+ else
+ {
+ Log3 $name, 3, "FB_CALLMONITOR: the reverse search result for $number could not be extracted from dasschnelle.at. Please contact the FHEM community.";
+ }
}
}