forked from indymedia/epicyon
Fix getting posts
parent
27858b70e9
commit
553349c3f2
12
epicyon.py
12
epicyon.py
|
@ -82,6 +82,12 @@ if args.testsnetwork:
|
||||||
testPostMessageBetweenServers()
|
testPostMessageBetweenServers()
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
|
if args.posts:
|
||||||
|
nickname=args.posts.split('@')[0]
|
||||||
|
domain=args.posts.split('@')[1]
|
||||||
|
getPublicPostsOfPerson(nickname,domain)
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
if not args.domain:
|
if not args.domain:
|
||||||
print('Specify a domain with --domain [name]')
|
print('Specify a domain with --domain [name]')
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
@ -100,10 +106,4 @@ federationList=[]
|
||||||
if args.federationList:
|
if args.federationList:
|
||||||
federationList=args.federationList.copy()
|
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)
|
runDaemon(domain,port,https,federationList,useTor)
|
||||||
|
|
2
posts.py
2
posts.py
|
@ -22,6 +22,7 @@ from cache import storePersonInCache
|
||||||
from cache import getPersonFromCache
|
from cache import getPersonFromCache
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
from random import randint
|
from random import randint
|
||||||
|
from session import createSession
|
||||||
from session import getJson
|
from session import getJson
|
||||||
from session import postJson
|
from session import postJson
|
||||||
from webfinger import webfingerHandle
|
from webfinger import webfingerHandle
|
||||||
|
@ -541,6 +542,7 @@ def getPublicPostsOfPerson(nickname,domain):
|
||||||
""" This is really just for test purposes
|
""" This is really just for test purposes
|
||||||
"""
|
"""
|
||||||
useTor=True
|
useTor=True
|
||||||
|
port=443
|
||||||
session = createSession(domain,port,useTor)
|
session = createSession(domain,port,useTor)
|
||||||
personCache={}
|
personCache={}
|
||||||
cachedWebfingers={}
|
cachedWebfingers={}
|
||||||
|
|
Loading…
Reference in New Issue