mirror of https://gitlab.com/bashrc2/epicyon
Try again with different headers
parent
fd73beb56b
commit
021b7a8494
11
posts.py
11
posts.py
|
@ -231,8 +231,19 @@ def parseUserFeed(signingPrivateKeyPem: str,
|
||||||
print('Getting user feed for ' + feedUrl)
|
print('Getting user feed for ' + feedUrl)
|
||||||
print('User feed header ' + str(asHeader))
|
print('User feed header ' + str(asHeader))
|
||||||
print('httpPrefix ' + str(httpPrefix))
|
print('httpPrefix ' + str(httpPrefix))
|
||||||
|
|
||||||
feedJson = getJson(signingPrivateKeyPem, session, feedUrl, asHeader, None,
|
feedJson = getJson(signingPrivateKeyPem, session, feedUrl, asHeader, None,
|
||||||
debug, projectVersion, httpPrefix, domain)
|
debug, projectVersion, httpPrefix, domain)
|
||||||
|
if not feedJson:
|
||||||
|
profileStr = 'https://www.w3.org/ns/activitystreams'
|
||||||
|
acceptStr = 'application/ld+json; profile="' + profileStr + '"'
|
||||||
|
if asHeader['Accept'] != acceptStr:
|
||||||
|
asHeader = {
|
||||||
|
'Accept': acceptStr
|
||||||
|
}
|
||||||
|
feedJson = getJson(signingPrivateKeyPem, session, feedUrl,
|
||||||
|
asHeader, None, debug, projectVersion,
|
||||||
|
httpPrefix, domain)
|
||||||
if not feedJson:
|
if not feedJson:
|
||||||
if debug:
|
if debug:
|
||||||
print('No user feed was returned')
|
print('No user feed was returned')
|
||||||
|
|
Loading…
Reference in New Issue