def get_wyr(headers):
 r = requests.get(url=API_URL, headers=headers)
 data = r.json()
 data['title'] = data['title'].strip().capitalize().rstrip('.?,:')
 data['choicea'] = data['choicea'].strip().lower().rstrip('.?,!').lstrip('.')
 data['choiceb'] = data['choiceb'].strip().lower().rstrip('.?,!').lstrip('.')
 if data['tags']:
  data['tags'] = data['tags'].lower().split(',')
 else:
  data['tags'] = []
 if data['nsfw']:
  data['tags'].append('nsfw')
 return data

def get_wyr ( headers ) : r = requests . get ( url = API_URL , headers = headers ) data = r . json ( ) data [ 'title' ] = data [ 'title' ] . strip ( ) . capitalize ( ) . rstrip ( '.?,:' ) data [ 'choicea' ] = data [ 'choicea' ] . strip ( ) . lower ( ) . rstrip ( '.?,!' ) . lstrip ( '.' ) data [ 'choiceb' ] = data [ 'choiceb' ] . strip ( ) . lower ( ) . rstrip ( '.?,!' ) . lstrip ( '.' ) if data [ 'tags' ] : data [ 'tags' ] = data [ 'tags' ] . lower ( ) . split ( ',' ) else : data [ 'tags' ] = [ ] if data [ 'nsfw' ] : data [ 'tags' ] . append ( 'nsfw' ) return data
gets a entry from the rrrather api and cleans up the data .