Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix data.data problem

  • Loading branch information...
commit ce6127792e5868939ba7dd68cc2899f741b0bbb1 1 parent 6ab6ec5
@michielbdejong authored
View
4 integrationTests.js
@@ -2,9 +2,7 @@ var masterParser = require('./masterParser');
function doFile(url, expect) {
masterParser.parse(url, 'input', function(err, data) {
- console.log(err);
- console.log(data);
- console.log(expect);
+ delete data.data;
if(err) {
console.log('********** FAIL '+url+': '+err);
} else {
View
2  masterParser.js
@@ -120,7 +120,7 @@ function parse(url, docRel, cb) {
data.tools['twitter:'+data.textFields.nick]='RSM';
}
data.textFields.type='user';
- delete data.data;
+ //delete data.data;
cb(err, data);
});
}
View
4 parser/html.js
@@ -12,9 +12,9 @@ function parseSubTree(subTree, state, cb) {
} else {
nameField='fullName';
}
- } else if(classTags[i]=='mpfriend') {
+ } else if(classTags[i]=='mpfriend' && !state.inANotice) {
cb('follows', subTree.attribs.href, true);
- } else if(classTags[i]=='avatar') {
+ } else if(classTags[i]=='avatar' && !state.inANotice) {
cb('images', 'avatar', subTree.attribs.src);
} else if(classTags[i]=='notice') {
state.inANotice=true;
View
2  parser/rdf.js
@@ -37,7 +37,7 @@ exports.parse = function(url, docRel, headers, content, cb) {
};
thisObj.textFields.fullName = data2.Agent[i].name;
thisObj.textFields.bio = data2.Agent[i]['bio:olb'];
- if(data2.Agent[i].account && data2.Agent[i].account.OnlineAccount && data2.Agent[i].account.OnlineAccount.accountName) {
+ if(data2.Agent[i].account) {// && data2.Agent[i].account.OnlineAccount && data2.Agent[i].account.OnlineAccount.accountName) {
thisObj.textFields.nick = data2.Agent[i].account.OnlineAccount.accountName;
}
if(data2.Agent[i].img && data2.Agent[i].img.Image && data2.Agent[i].img.Image['@'] && data2.Agent[i].img.Image['@']['rdf:about']) {
View
7 unitTests.js
@@ -2,9 +2,7 @@ var masterParser = require('./masterParser');
function doFile(url, expect) {
masterParser.parse(url, 'input', function(err, data) {
- console.log(err);
- console.log(data);
- console.log(expect);
+ delete data.data;
if(err) {
console.log('********** FAIL '+url+': '+err);
} else {
@@ -64,7 +62,6 @@ doFile('michielbdejong@identi.ca', {
'http://identi.ca/api/statuses/user_timeline/425878.atom': 'S',
}
});
-/*
doFile('michiel@revolutionari.es', {
documents: {
'https://revolutionari.es/profile/michiel': true,
@@ -197,4 +194,4 @@ doFile('http://www.w3.org/People/Berners-Lee/card.rdf', {
'xmpp:tim.bernerslee.9@facebook.com': 'SM',
'https://facebook.com/tim.bernerslee.9': 'R',
'facebook:tim.bernerslee.9': 'RSCM' }
-});*/
+});
Please sign in to comment.
Something went wrong with that request. Please try again.