title: InstaPy media = post_page[0]["shortcode_media"] KeyError: 0
body: <p>I am building an instagram bot but I run into this error:</p>
  <pre><code>   Traceback (most recent call last):
    File &quot;C:\Users\User\Desktop\instabot\insta.py&quot;, line 42, in &lt;module&gt;
      job()
    File &quot;C:\Users\User\Desktop\instabot\insta.py&quot;, line 26, in job
      session.like_by_locations([&quot;213359469/munich-germany/&quot;], amount = 10)
    File &quot;C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\instapy\instapy.py&quot;, line 1516, in like_by_locations
      inappropriate, user_name, is_video, reason, scope = check_link(
    File &quot;C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\instapy\like_util.py&quot;, line 633, in check_link
      media = post_page[0][&quot;shortcode_media&quot;]
  KeyError: 0
  </code></pre>
  <p>This is my code:</p>
  <pre><code>from instapy import InstaPy
  
  #headless_browser = True if you want to hide your browser
  session = InstaPy(username = &quot;-----&quot;, password = &quot;----&quot;, headless_browser = False)
  session.login()
  session.like_by_tags([&quot;bmw&quot;, &quot;steam&quot;], amount = 3, media=&quot;Photo&quot;)
  session.end()
  </code></pre>