aboutsummaryrefslogtreecommitdiffstats
path: root/include/Scrape.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/Scrape.php')
-rw-r--r--include/Scrape.php27
1 files changed, 20 insertions, 7 deletions
diff --git a/include/Scrape.php b/include/Scrape.php
index 642b8e624..f5b15c82f 100644
--- a/include/Scrape.php
+++ b/include/Scrape.php
@@ -30,8 +30,11 @@ function scrape_dfrn($url) {
}
}
-
- $dom = HTML5_Parser::parse($s);
+ try {
+ $dom = HTML5_Parser::parse($s);
+ } catch (DOMException $e) {
+ logger('scrape_dfrn: parse error: ' . $e);
+ }
if(! $dom)
return $ret;
@@ -132,9 +135,11 @@ function scrape_meta($url) {
}
}
-
-
- $dom = HTML5_Parser::parse($s);
+ try {
+ $dom = HTML5_Parser::parse($s);
+ } catch (DOMException $e) {
+ logger('scrape_meta: parse error: ' . $e);
+ }
if(! $dom)
return $ret;
@@ -177,7 +182,11 @@ function scrape_vcard($url) {
}
}
- $dom = HTML5_Parser::parse($s);
+ try {
+ $dom = HTML5_Parser::parse($s);
+ } catch (DOMException $e) {
+ logger('scrape_vcard: parse error: ' . $e);
+ }
if(! $dom)
return $ret;
@@ -243,7 +252,11 @@ function scrape_feed($url) {
}
}
- $dom = HTML5_Parser::parse($s);
+ try {
+ $dom = HTML5_Parser::parse($s);
+ } catch (DOMException $e) {
+ logger('scrape_feed: parse error: ' . $e);
+ }
if(! $dom)
return $ret;