debian/changelog: release package version 1.4.0-1
[tweeper.git] / tests / instument_to_catch_promoted_tweets.diff
1 diff --git a/src/Tweeper.php b/src/Tweeper.php
2 index 8ac2fe3..c45aab5 100644
3 --- a/src/Tweeper.php
4 +++ b/src/Tweeper.php
5 @@ -355,6 +355,15 @@ class Tweeper {
6        $html = call_user_func_array(array($this, $preprocess_html_host_method), array($html));
7      }
8  
9 +    // XXX REMOVE: instrumentation to catch promoted tweets
10 +    if ($host == "twitter.com") {
11 +      $twitter_promoted_match_expr = '/promoted/i';
12 +      $ret = preg_match($twitter_promoted_match_expr, $html, $matches);
13 +      if ($ret) {
14 +        file_put_contents("/home/ao2/TWITTER_PROMOTED_DUMP.html", $html);
15 +      }
16 +    }
17 +
18      $xmlDoc = $this->htmlToXml($html, $host);
19      if (NULL === $xmlDoc) {
20        return NULL;