Minor adjustments to some resolutions.

This commit is contained in:
AccentuSoft
2022-02-10 11:37:54 +02:00
parent 7e63d9c956
commit f2d123ad90
4 changed files with 12 additions and 11 deletions

View File

@@ -26,7 +26,7 @@ class GetWebsiteBody:
for entity in entityJsonList:
uid = entity['uid']
primaryField = entity[list(entity)[1]]
primaryField = entity['URL']
if primaryField.startswith('http://') or primaryField.startswith('https://'):
url = primaryField

View File

@@ -11,10 +11,11 @@ class Reddit:
"look for posts by users in subreddits.",
'type': 'MultiChoice',
'value': {'comments', 'submission'}},
'Number of results': {'description': 'Creating a lot of nodes could slow down the software. Please '
'Number of results': {'description': 'Enter the maximum number of results you want returned. '
'Creating a lot of nodes could slow down the software. Please '
'be mindful of the value you enter.',
'type': 'String',
'value': 'Enter the number of results you want returned',
'value': '',
'default': '10'}}
def resolution(self, entityJsonList, parameters):
@@ -68,13 +69,13 @@ class Reddit:
resolution_name = 'https://reddit.com' + resolution_name
if submission_endpoint in future.result().url:
return_result.append([{'Full Name': value['author'],
'Entity Type': 'Person'},
return_result.append([{'User Name': value['author'],
'Entity Type': 'Social Media Handle'},
{index_of_child: {'Resolution': resolution_name, 'Notes': ''}}])
elif comments_endpoint in future.result().url:
index_of_child_of_child = len(return_result)
return_result.append([{'Full Name': value['author'],
'Entity Type': 'Person'},
return_result.append([{'User Name': value['author'],
'Entity Type': 'Social Media Handle'},
{index_of_child: {'Resolution': resolution_name,
'Notes': ''}}])

View File

@@ -8,8 +8,8 @@ Note: Creates log files in temp folders in /tmp. Files are only readable by the
class Social_Analyzer:
name = "Social Analyzer"
description = "Find potentially connected social media accounts."
originTypes = {'Phrase'}
resultTypes = {'Social Media Account'}
originTypes = {'Phrase', 'Social Media Handle'}
resultTypes = {'Social Media Handle'}
parameters = {'websites': {'description': 'Enter the domain names of the social media websites'
' to check or "all" (no quotes) to check all available websites.'
' Note that some of the results could be false positives.',
@@ -77,7 +77,7 @@ class Social_Analyzer:
# Have to keep re-importing so that it works for entities beyond the first.
SocialAnalyzer = import_module("social-analyzer").SocialAnalyzer(silent=True)
uid = entity['uid']
social_field = entity[list(entity)[1]].strip()
social_field = entity[list(entity)[1]].strip().lower()
results = SocialAnalyzer.run_as_object(
username=social_field, silent=True, output="json", filter='good', metadata=False, logs_dir='',
websites=websites, mode='fast', timeout=10, profiles='detected')

View File

@@ -17,7 +17,7 @@ class Whats_My_Name:
name = "Whats My Name"
description = "Find potentially connected social media accounts."
originTypes = {'Phrase', 'Person'}
originTypes = {'Phrase', 'Person', 'Social Media Handle'}
resultTypes = {'Website'}
parameters = {}