Spaces:
Running
Running
Update post_blog.py
Browse files- post_blog.py +2 -1
post_blog.py
CHANGED
@@ -125,12 +125,13 @@ def post_post(title, category, body, image):
|
|
125 |
"labels": [category, "recent"]
|
126 |
}
|
127 |
data = requests.post(url, headers=headers, json=post_data).json()
|
128 |
-
print(data)
|
129 |
if data['status'] == 'LIVE':
|
130 |
return True
|
131 |
else:
|
|
|
132 |
return False
|
133 |
except Exception as e:
|
|
|
134 |
print('An error occurred:', str(e))
|
135 |
return False
|
136 |
|
|
|
125 |
"labels": [category, "recent"]
|
126 |
}
|
127 |
data = requests.post(url, headers=headers, json=post_data).json()
|
|
|
128 |
if data['status'] == 'LIVE':
|
129 |
return True
|
130 |
else:
|
131 |
+
print(data)
|
132 |
return False
|
133 |
except Exception as e:
|
134 |
+
print(data)
|
135 |
print('An error occurred:', str(e))
|
136 |
return False
|
137 |
|