Spaces:
Running
Running
Update linkedin_follower_stats.py
Browse files
linkedin_follower_stats.py
CHANGED
|
@@ -209,7 +209,9 @@ def fetch_monthly_follower_gains(session, org_urn, api_rest_base):
|
|
| 209 |
f"{api_rest_base}/organizationalEntityFollowerStatistics"
|
| 210 |
f"?q=organizationalEntity"
|
| 211 |
f"&organizationalEntity={org_urn}"
|
| 212 |
-
f"&timeIntervals={
|
|
|
|
|
|
|
| 213 |
)
|
| 214 |
|
| 215 |
results = []
|
|
@@ -220,7 +222,7 @@ def fetch_monthly_follower_gains(session, org_urn, api_rest_base):
|
|
| 220 |
|
| 221 |
elements = data.get('elements', [])
|
| 222 |
if not elements:
|
| 223 |
-
logging.info(f"No 'elements' found in API response for {org_urn} for start_ms {
|
| 224 |
|
| 225 |
for item in elements:
|
| 226 |
time_range = item.get('timeRange', {})
|
|
|
|
| 209 |
f"{api_rest_base}/organizationalEntityFollowerStatistics"
|
| 210 |
f"?q=organizationalEntity"
|
| 211 |
f"&organizationalEntity={org_urn}"
|
| 212 |
+
f"&timeIntervals.timeRange.start={start_date}"
|
| 213 |
+
f"&timeIntervals.timeRange.end={end_date}"
|
| 214 |
+
f"&timeIntervals.timeGranularityType=MONTH"
|
| 215 |
)
|
| 216 |
|
| 217 |
results = []
|
|
|
|
| 222 |
|
| 223 |
elements = data.get('elements', [])
|
| 224 |
if not elements:
|
| 225 |
+
logging.info(f"No 'elements' found in API response for {org_urn} for start_ms {start_date}.")
|
| 226 |
|
| 227 |
for item in elements:
|
| 228 |
time_range = item.get('timeRange', {})
|