'Get media ID set, by your hashtag'

def get_media_id_by_tag(self, tag):

    if self.login_status:
        log_string = ('Get    media    id    by    tag:    %s' % tag)
        self.write_log(log_string)
        if (self.login_status == 1):
            url_tag = (self.url_tag % tag)
            try:
                r = self.s.get(url_tag)
                all_data = json.loads(r.text)
                self.media_by_tag = list(all_data['tag']['media']['nodes'])
            except:
                self.media_by_tag = []
                self.write_log('Except    on    get_media!')
        else:
            return 0
