GuglielmoTor commited on
Commit
b6b83b2
·
verified ·
1 Parent(s): b205514

Update linkedin_follower_stats.py

Browse files
Files changed (1) hide show
  1. linkedin_follower_stats.py +4 -2
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={time_intervals}"
 
 
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 {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', {})