Skip to content

Commit

Permalink
Merge pull request #62 from HarmenM/master
Browse files Browse the repository at this point in the history
Ignore default Twitter logo
  • Loading branch information
HarmenM authored Apr 19, 2019
2 parents 90b7496 + 1bc8b37 commit 1c84932
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/lib/extractors/AbstractStrategy.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class AbstractStrategy
const response = await fetch(src);

result.buffer = await response.buffer();
result.origin = src;
result.origin = response.url || src;
}

const imageInfo = imageType(result.buffer);
Expand Down
3 changes: 2 additions & 1 deletion app/lib/extractors/twitter-logo/TwitterLogoStrategy.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ class TwitterLogoStrategy extends AbstractStrategy
result.weight
);

if(definition) {
// Twitter logo can also resolve to default profile logo, ignore the egg ;-) (Which is not an egg anymore)
if(definition && definition.origin.indexOf("default_profile") === -1) {
images.push((definition));
}
}
Expand Down

0 comments on commit 1c84932

Please sign in to comment.