diff --git a/src/Tweeper.php b/src/Tweeper.php index 8ac2fe3..c45aab5 100644 --- a/src/Tweeper.php +++ b/src/Tweeper.php @@ -355,6 +355,15 @@ class Tweeper { $html = call_user_func_array(array($this, $preprocess_html_host_method), array($html)); } + // XXX REMOVE: instrumentation to catch promoted tweets + if ($host == "twitter.com") { + $twitter_promoted_match_expr = '/promoted/i'; + $ret = preg_match($twitter_promoted_match_expr, $html, $matches); + if ($ret) { + file_put_contents("/home/ao2/TWITTER_PROMOTED_DUMP.html", $html); + } + } + $xmlDoc = $this->htmlToXml($html, $host); if (NULL === $xmlDoc) { return NULL;