Verified Commit 741ab533 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Added proper header when querying activity pub actor

parent ee0341ba
......@@ -10,10 +10,18 @@ from . import utils
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()
return response.json()
try:
return response.json()
except:
raise ValueError(
'Invalid actor payload: {}'.format(response.text))
SYSTEM_ACTORS = {
'library': {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment