Jump to content

bjornelvar

Member
  • Posts

    5
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

bjornelvar's Achievements

Helping Hand

Helping Hand (3/5)

0

Reputation

  1. Thanks! Yeah, it is definitely something I want to do. The NBA API package in Python made this pretty easy for me, just gotta find something similiar with other sports and leagues.
  2. NBA Scores Github here Release here Description Gets today's NBA games using Alfred. Usage Use the default keyword 'nba' to get today's games or live scores.
  3. AH! Thank you!! It really was that easy. It worked. Didn't know I needed an Open URL object in my workflow. Thanks again!
  4. Hi! I want to make my objects open up web pages with Python, is there any way to do this? I would have to create urls with each iteration and inserting into the object/dictionary so every game is assigned a url. The first object in the image would for example open the game's boxscore with the user's default browser. There is no query in my script. def get_alfred_items(): results = [] url = "https://www.alfredapp.com/workflows/" for i, j in zip(scores_list, player_leaders): results.append({ "title": f"{i[0]} {i[1]} - {i[2]} {i[3]} ({gametime_list[scores_list.index(i)]})", # [home] [pts] - [pts] [away] "subtitle": f"{j[0]}: {j[1]}pts/{j[2]}reb/{j[3]}ast - {j[4]}: {j[5]}pts/{j[6]}reb/{j[7]}ast", "url": url + i[0], # I WANT TO DO THIS }) return results if __name__ == "__main__": alfred_json = json.dumps({ "items": get_alfred_items() }) sys.stdout.write(alfred_json)
×
×
  • Create New...