Author Topic: Picture comment rss feed?  (Read 1168 times)

Offline melman

  • Member
  • Posts: 5
Picture comment rss feed?
« on: November 25, 2007, 08:45:43 AM »
I love the comment rss feed you put together. It should be possible to create one for the picture comments as well...is this something you've thought about implementing?

Offline FB

  • Administrator
  • Member
  • *****
  • Posts: 154
    • Myspace Scrape
Re: Picture comment rss feed?
« Reply #1 on: November 25, 2007, 02:42:02 PM »
I love the comment rss feed you put together. It should be possible to create one for the picture comments as well...is this something you've thought about implementing?

I'll have to see about this, it shouldn't be too hard to change the comments feed to work for picture comments also. I'll put this on my TODO list.

Offline melman

  • Member
  • Posts: 5
Re: Picture comment rss feed?
« Reply #2 on: December 18, 2007, 09:41:45 PM »
any update on this?
maybe you can the latest picture comment show up in addition to the caption when you grab the pics to display on one page.

Offline FB

  • Administrator
  • Member
  • *****
  • Posts: 154
    • Myspace Scrape
Re: Picture comment rss feed?
« Reply #3 on: January 14, 2008, 12:27:48 AM »
any update on this?
maybe you can the latest picture comment show up in addition to the caption when you grab the pics to display on one page.

This probably won't be implemented until a few months from now. My schedule is too hectic to be able to do any major updates on the site right now.

Offline melman

  • Member
  • Posts: 5
Re: Picture comment rss feed?
« Reply #4 on: January 14, 2008, 11:25:06 AM »
a few months? it's already been a few months since the original request...dang bet i get it done in a couple hours if had your codebase.

btw there's a error on the grab the pics page. the generated links all say: http://collect.myspace.com/index.cfm?fuseaction=bandprofile.processLabelType
and no longer link to the picture page with the comments on them.

and it looks like myspace closed the loophole whereby you could see the picture comments of a private profile's (not your friend) public album's pics.

Offline FB

  • Administrator
  • Member
  • *****
  • Posts: 154
    • Myspace Scrape
Re: Picture comment rss feed?
« Reply #5 on: January 18, 2008, 08:07:38 PM »
Well, if you're willing to create it yourself you can search for "Myspace.access.class.php" and download that, then use PHP Curl to load the page containing the comments for the pictures (each picture). I recommend several nested for loops. After that, you can extract the comments from the HTML pages generated by Myspace using regular expressions, then you can loop through the extracted text, outputting the results in well formatted HTML.

I see that it's not hard right? Oh yes, if you ever find out what headers Myspace expects during the POST requests to switch pages in the pictures be sure to tell me.

I also see that you must have a lot of times on your life, unlike me. This site is not my life, and I have plenty of other, more important things that take up my time. I cannot just sit down and add this feature because one person wants it. This IS after all a website that provides a free service. I do not ask anything from you.

Offline melman

  • Member
  • Posts: 5
Re: Picture comment rss feed?
« Reply #6 on: January 28, 2008, 08:54:27 PM »
Code: [Select]
<html>
<head>
<style type="text/css">
table {
width:100%;
border-width: 2px;
border-spacing: 3px;
border-style: outset;
border-color: #808080;
border-collapse: separate;
background-color: #ffffff;
}
th {
border-width: 1px;
padding: 5px;
border-style: inset;
border-color: #808080;
background-color: #ffffff;
}
td {
border-width: 1px;
padding: 5px;
border-style: inset;
border-color: #808080;
background-color: #ffffff;
}
</style>
</head>
<body>
<table><tr>
<?php 
require("../class/accessClass.php");
function 
extractText($pat1,$pat2,$page) {
$result '';
$result = @explode($pat1$page);
if (sizeof($result)>1){
$result = @explode($pat2$result[1]);
$result $result[0];
$result ereg_replace("<br>"""$result);
$result trim($result);
} else{
$result='';
}
return $result;
}

$friendid='';
$user='';
$pass='';

$t=new myspace("t");
$t->myspaceCreds($user,$pass);

$t->newLocation('http://viewmorepics.myspace.com/index.cfm?fuseaction=user.viewPicture&friendID='.$friendid);
$loc html_entity_decode(extractText('class="photo_image" href="','"><',$t->page));
$numpics extractText('Listing 1-','</div>',$t->page);
$pos strpos($numpics'of ');
$numpics substr($numpics$pos+3);

for(
$i=1;$i<$numpics;$i++){
$t->newLocation($loc);
$srcextractText('onload="FixImage()" src="','" style=',$t->page);
$src ereg_replace("l_""m_"$src);
$src ereg_replace("_l""_m"$src);

$cap extractText('ImageView_lblCaption">','</span></div>',$t->page);

$lastposter extractText('<td style="text-align: center;" rowspan="2">','</a>',$t->page);
$lastcomment extractText('</strong>','</td>',$t->page);

echo '<td><a href="'.$loc.'"><img src="'.$src.'"></a><br>'.$cap;
$list extractText("Listing 1","</td>",$t->page)." ";
$pos strpos($list'of ');
if ($pos === false) {
echo '<br><br>No Comments</td>';
}else{
echo '<br>'.substr($list$pos+3).' Comments';
echo '<br><br>Last on: '.extractText("<strong>","</strong>",$t->page);
echo '<br>By: '.$lastposter."</a>";
echo '<br>'.$lastcomment."</td>";
}
$loc extractText('Previous</a> | <a href="','" title',$t->page);
if ($i%4==0){
echo '</tr><tr>';
}
}
?>

</table>
</body>
</html>