Added proper header when querying activity pub actor
This commit is contained in:
parent
ee0341ba1a
commit
741ab533b1
|
@ -10,10 +10,18 @@ from . import utils
|
||||||
|
|
||||||
|
|
||||||
def get_actor_data(actor_url):
|
def get_actor_data(actor_url):
|
||||||
response = requests.get(actor_url)
|
response = requests.get(
|
||||||
|
actor_url,
|
||||||
|
headers={
|
||||||
|
'Accept': 'application/activity+json',
|
||||||
|
}
|
||||||
|
)
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
|
try:
|
||||||
return response.json()
|
return response.json()
|
||||||
|
except:
|
||||||
|
raise ValueError(
|
||||||
|
'Invalid actor payload: {}'.format(response.text))
|
||||||
|
|
||||||
SYSTEM_ACTORS = {
|
SYSTEM_ACTORS = {
|
||||||
'library': {
|
'library': {
|
||||||
|
|
Loading…
Reference in New Issue