]> git.mxchange.org Git - friendica.git/blobdiff - include/Scrape.php
Merge pull request #14 from duthied/master
[friendica.git] / include / Scrape.php
index fd41b7bc645fb9c92d8e3b58cacca95d5307c28d..642b8e624c5601d1a7ab20c6b4f5c4e76fe5b8b3 100644 (file)
@@ -249,20 +249,6 @@ function scrape_feed($url) {
                return $ret;
 
 
-       $items = $dom->getElementsByTagName('img');
-
-       // get img elements (twitter)
-
-       if($items) {
-               foreach($items as $item) {
-                       $x = $item->getAttribute('id');
-                       if($x === 'profile-image') {
-                               $ret['photo'] = $item->getAttribute('src');
-                       }
-               }
-       }
-
-
        $head = $dom->getElementsByTagName('base');
        if($head) {
                foreach($head as $head0) {
@@ -536,7 +522,7 @@ function probe_url($url, $mode = PROBE_NORMAL) {
                        $profile = 'http://twitter.com/#!/' . $tid;
                        $vcard['photo'] = 'https://api.twitter.com/1/users/profile_image/' . $tid;
                        $vcard['nick'] = $tid;
-                       $vcar['fn'] = $tid . '@twitter';
+                       $vcard['fn'] = $tid . '@twitter';
                }
 
                if(! x($vcard,'fn'))
@@ -547,7 +533,7 @@ function probe_url($url, $mode = PROBE_NORMAL) {
 
                if($twitter || ! $poll)
                        $check_feed = true;
-               if((! isset($vcard)) || (! $profile))
+               if((! isset($vcard)) || (! x($vcard,'fn')) || (! $profile))
                        $check_feed = true;
                if(($at_addr) && (! count($links)))
                        $check_feed = false;