bugsuse / pytropomi

To download Sentinel-5 Product from TROPOMI's s5phub
MIT License
22 stars 8 forks source link

Don't use absolute indexes #5

Open zxdawn opened 2 years ago

zxdawn commented 2 years ago

https://github.com/bugsuse/pytropomi/blob/91f8c7b0fa60a30d23bec555adc4f83ead14dddb/pytropomi/s5p.py#L330-L334

Using absolute indexes will cause errors if the website updates. The better method is to convert the list into dict. Then, use the key to get the value.

zxdawn commented 2 years ago

Well, product.get('children') is a list consists of dicts .... It's more complicated. Just leave this open.