From 553349c3f2900c3219c380089ad3302fe329f830 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 3 Jul 2019 11:33:55 +0100 Subject: [PATCH] Fix getting posts --- epicyon.py | 12 ++++++------ posts.py | 2 ++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/epicyon.py b/epicyon.py index 3cff5738..45ca6572 100644 --- a/epicyon.py +++ b/epicyon.py @@ -82,6 +82,12 @@ if args.testsnetwork: testPostMessageBetweenServers() sys.exit() +if args.posts: + nickname=args.posts.split('@')[0] + domain=args.posts.split('@')[1] + getPublicPostsOfPerson(nickname,domain) + sys.exit() + if not args.domain: print('Specify a domain with --domain [name]') sys.exit() @@ -100,10 +106,4 @@ federationList=[] if args.federationList: federationList=args.federationList.copy() -if args.posts: - nickname=args.posts.split('@')[0] - domain=args.posts.split('@')[1] - getPublicPostsOfPerson(nickname,domain) - sys.exit() - runDaemon(domain,port,https,federationList,useTor) diff --git a/posts.py b/posts.py index fed16462..810b09c1 100644 --- a/posts.py +++ b/posts.py @@ -22,6 +22,7 @@ from cache import storePersonInCache from cache import getPersonFromCache from pprint import pprint from random import randint +from session import createSession from session import getJson from session import postJson from webfinger import webfingerHandle @@ -541,6 +542,7 @@ def getPublicPostsOfPerson(nickname,domain): """ This is really just for test purposes """ useTor=True + port=443 session = createSession(domain,port,useTor) personCache={} cachedWebfingers={}