original_docstring: 
      Get ParionsSport odds from baskteball match id
      
docstring: Get ParionsSport odds from baskteball match id
docstring_tokens: Get ParionsSport odds from baskteball match id
code: def parse_parionssport_match_basketball(id_match):
      """
      Get ParionsSport odds from baskteball match id
      """
      url = ("https://www.enligne.parionssport.fdj.fr/lvs-api/ff/{}?originId=3&lineId=1&showMarketTypeGroups=true&ext=1"
             "&showPromotions=true".format(id_match))
      req = urllib.request.Request(url, headers={'X-LVS-HSToken': sb.TOKENS["parionssport"]})
      content = urllib.request.urlopen(req).read()
      parsed = json.loads(content)
      items = parsed["items"]
      odds = []
      odds_match = {}
      for item in items:
          if not item.startswith("o"):
              continue
          odd = items[item]
          market = items[odd["parent"]]
          if not "desc" in market:
              continue
          if not market["desc"] == "Face à Face":
              continue
          if not "period" in market:
              continue
          if not market["period"] == "Match":
              continue
          event = items[market["parent"]]
          if "date" not in odds_match:
              odds_match["date"] = datetime.datetime.strptime(event["start"], "%y%m%d%H%M") + datetime.timedelta(hours=2)
          odds.append(float(odd["price"].replace(",", ".")))
      if not odds:
          return odds_match
      odds_match["odds"] = {"parionssport" : odds}
      odds_match["id"] = {"parionssport" : market["parent"]}
      return odds_match
code_tokens: def parse_parionssport_match_basketball ( id_match ) : url = ( "https://www.enligne.parionssport.fdj.fr/lvs-api/ff/{}?originId=3&lineId=1&showMarketTypeGroups=true&ext=1" "&showPromotions=true" . format ( id_match ) ) req = urllib . request . Request ( url , headers = { 'X-LVS-HSToken' : sb . TOKENS [ "parionssport" ] } ) content = urllib . request . urlopen ( req ) . read ( ) parsed = json . loads ( content ) items = parsed [ "items" ] odds = [ ] odds_match = { } for item in items : if not item . startswith ( "o" ) : continue odd = items [ item ] market = items [ odd [ "parent" ] ] if not "desc" in market : continue if not market [ "desc" ] == "Face à Face":  continue if not "period" in market : continue if not market [ "period" ] == "Match" : continue event = items [ market [ "parent" ] ] if "date" not in odds_match : odds_match [ "date" ] = datetime . datetime . strptime ( event [ "start" ] , "%y%m%d%H%M" ) + datetime . timedelta ( hours = 2 ) odds . append ( float ( odd [ "price" ] . replace ( "," , "." ) ) ) if not odds : return odds_match odds_match [ "odds" ] = { "parionssport" : odds } odds_match [ "id" ] = { "parionssport" : market [ "parent" ] } return odds_match
short_docstring: Get ParionsSport odds from baskteball match id
short_docstring_tokens: Get ParionsSport odds from baskteball match id
comment: """
      Get ParionsSport odds from baskteball match id
      """