sixP-NaraKa/pyvod-chat

Strptime format error

Closed this issue · 3 comments

An exception occurred while processing one of the videos:
...\lib\site-packages\pyvod\vodchat.py", line 148, in get_comments _comment_datetime = datetime.strptime(created_at
...
ValueError: time data '2021-09-09T20:15:52.40990439Z' does not match format '%Y-%m-%dT%H:%M:%S.%fZ'

It may be worth replacing datetime.strptime() with dateutil.parser.parse()

Hello @wishes90,
sorry for the delayed response.
First of all though, thank you for pointing this issue out, I will look into it! 👍

Hey @wishes90,

I have made a fix for this issue and also opened a pull request #4 for it as well (branch ISSUE-3).
In order to get the changes from that branch, you can simply install pyvod-chat via

  • pip install git+https://github.com/sixP-NaraKa/pyvod-chat.git@ISSUE-3
  • or maybe your other preferred ways (like cloning the repo)

If that shouldn't get you the changes (didn't for me), you might need to pip uninstall pyvod-chat first, and then rerun the above command. 👍

Could you test with the VOD ID with which it previously failed and notify me of the result? Would be appreciated.
Thanks!

Note: integrated the mentioned pull request and published a new PyPi version: https://pypi.org/project/pyvod-chat/0.2.1/