rainyroads / pysaucenao

PySauceNao is an unofficial asynchronous library for the SauceNao API. It supports lookups via URL or from the local filesystem.
GNU General Public License v3.0
39 stars 8 forks source link

ValueError: time data '2017-04-21T05:16:51.000Z' does not match format '%Y-%m-%dT%H:%M:%SZ' #15

Open rainyroads opened 3 years ago

rainyroads commented 3 years ago

@FeeeeK Need to remove created_at from the current release as it seems to be breaking on some queries

rainyroads commented 3 years ago

Nevermind, I forgot we still had #14 open regarding this.

Couldn't we just use arrow or something to reliably auto-parse the date format?

FeeeeK commented 3 years ago

A good solution would be to use regexes until Xamayon fixes it.

rainyroads commented 3 years ago

Is there any reason you'd be against using Arrow? I don't know for sure if it'd parse all the formats correctly but I imagine it should be smart enough to do so.

Do you have some examples of the different datetime string formats saucenao returns?

FeeeeK commented 3 years ago

Honestly, this is the first time I hear about Arrow. Looks good, but this is another dependency... However, it's up to you to decide. I would like to rewrite everything here or write my own wrapper, but I don't have time for that.

As for the time formats, I have noticed only these two so far.