mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-06 07:49:55 +02:00
Added proper header when querying activity pub actor
This commit is contained in:
parent
ee0341ba1a
commit
741ab533b1
1 changed files with 11 additions and 3 deletions
|
@ -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()
|
||||
try:
|
||||
return response.json()
|
||||
|
||||
except:
|
||||
raise ValueError(
|
||||
'Invalid actor payload: {}'.format(response.text))
|
||||
|
||||
SYSTEM_ACTORS = {
|
||||
'library': {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue