v0.5.1
This commit is contained in:
parent
01e9ae06f4
commit
7119d5bdf4
292 changed files with 790 additions and 16347 deletions
|
@ -172,21 +172,25 @@ function deleteContacts(database,user,callback) { // does nothing useful at the
|
|||
// })
|
||||
//}
|
||||
|
||||
function newRequestFriendsAlbumPictures(login,friend,rootwindow,callback){
|
||||
function newRequestFriendsAlbumPictures(login,friend,rootwindow,callback){print("newRequestFriendsAlbumPictures");
|
||||
// screenscraping of albums page of contact with remoteAuth
|
||||
Helperjs.friendicaRemoteAuthRequest(login,friend.url.replace("profile","photos"),friend.url,rootwindow,function(photohtml){
|
||||
try {var obj=JSON.parse(photohtml);
|
||||
//commented out for broken remoteauth
|
||||
//Helperjs.friendicaRemoteAuthRequest(login,friend.url.replace("profile","photos"),friend.url,rootwindow,function(photohtml){
|
||||
Helperjs.friendicaWebRequest(friend.url.replace("profile","photos"),rootwindow,function(photohtml){
|
||||
try {var obj=JSON.parse(photohtml);print ("Photohtml: "+photohtml)
|
||||
if (obj.hasOwnProperty('status')){
|
||||
Helperjs.friendicaWebRequest(friend.url.replace("profile","photos"),rootwindow,function(photohtml){
|
||||
getAlbumFromHtml(photohtml,false,rootwindow,callback)})
|
||||
}}
|
||||
catch (e){
|
||||
getAlbumFromHtml(photohtml,true,rootwindow,callback)
|
||||
//getAlbumFromHtml(photohtml,true,rootwindow,callback)
|
||||
getAlbumFromHtml(photohtml,false,rootwindow,callback)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function getAlbumFromHtml(photohtml,remoteAuthBool,rootwindow,callback){
|
||||
print(photohtml);
|
||||
var photoarray=[];
|
||||
var arr = photohtml.split("sidebar-photos-albums-li");
|
||||
for (var i=2;i<arr.length;i++){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue