mylesai commited on
Commit
06d36bc
·
verified ·
1 Parent(s): e0f90c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -8,6 +8,7 @@ RAPIDAPI_API_KEY = os.environ['RAPIDAPI_API_KEY']
8
  def scrape_instagram(user_name):
9
 
10
  url = "https://instagram-scraper-api2.p.rapidapi.com/v1/info"
 
11
 
12
  querystring = {"username_or_id_or_url":f"{user_name}"}
13
 
@@ -28,6 +29,7 @@ def scrape_instagram(user_name):
28
  return {} # Return an empty dictionary if there is no data in the response
29
 
30
  response_data = response_json['data']
 
31
 
32
  profile_info = {
33
  'bio': response_data.get('biography', ''),
@@ -142,10 +144,10 @@ def get_LI_info(df):
142
  df['Address'] = ''
143
  df['About'] = ''
144
  df['Current Role'] = ''
145
- df['Education'] = ''
146
 
147
  # Populate DataFrame with profile information
148
- for i in range(len(profile_info_list)):
149
  df.at[i, 'Full Name'] = profile_info_list[i]['full_name']
150
  df.at[i, 'Headline'] = profile_info_list[i]['headline']
151
  df.at[i, 'Connections'] = profile_info_list[i]['connections']
 
8
  def scrape_instagram(user_name):
9
 
10
  url = "https://instagram-scraper-api2.p.rapidapi.com/v1/info"
11
+ print(user_name)
12
 
13
  querystring = {"username_or_id_or_url":f"{user_name}"}
14
 
 
29
  return {} # Return an empty dictionary if there is no data in the response
30
 
31
  response_data = response_json['data']
32
+ print(response_data)
33
 
34
  profile_info = {
35
  'bio': response_data.get('biography', ''),
 
144
  df['Address'] = ''
145
  df['About'] = ''
146
  df['Current Role'] = ''
147
+ df['Most Recent Education'] = ''
148
 
149
  # Populate DataFrame with profile information
150
+ for i in range(len(profile_info_list)+1):
151
  df.at[i, 'Full Name'] = profile_info_list[i]['full_name']
152
  df.at[i, 'Headline'] = profile_info_list[i]['headline']
153
  df.at[i, 'Connections'] = profile_info_list[i]['connections']