dvingerh / PyInstaLive

Python script to download Instagram livestreams.
MIT License
547 stars 111 forks source link

Feature request: Manually creating comment log files from json #93

Closed alexroston closed 4 years ago

alexroston commented 4 years ago

I am using:

To ask a question, fill in the information below.

Question

Is it possible to create a command for "assembling" the comment json files as well? Sometimes, maybe because of connection lost, the application did not create the final video and comment log files. I could assemble the video files with the corresponding command manually, but --assemble will not work for comment json files as well.

dvingerh commented 4 years ago

I've committed some code for this earlier, you can already use it if you reinstall without specifying a version number. Will likely bump version to 3.2.3 next week depending on how https://github.com/dvingerh/PyInstaLive/issues/94 progresses

alexroston commented 4 years ago

Does it still check for the download folder to exist? Already deleted that folder and only got the comments.json. Isn't that enough to create the comments.log file?

dvingerh commented 4 years ago

Yes, only the comments.json file is required.

alexroston commented 4 years ago

Ok, nevertheless get this error:

pyinstalive --assemble ".\20200510_kamiyama_ryuji_0910_18066741298206293_1589116072_live_comments.json"
---------------------------------------------------------------------------
[I] PYINSTALIVE (SCRIPT V3.2.2 - PYTHON V3.8.0) - 05-25-2020 01:14:09 AM
---------------------------------------------------------------------------
[E] The segment directory does not exist or does not contain any files: .\20200510_kamiyama_ryuji_0910_18066741298206293_1589116072_live_comments
---------------------------------------------------------------------------

Link to file

dvingerh commented 4 years ago

It's a separate command, --generate-comments

e.g

pyinstalive --generate-comments 20200514_username_17851495463058848_1589454554_live_comments.json
UnixCro commented 2 years ago

--assemble is only intended to create a video file from the .json file using the segment file directory if the value skip_merge = True has been set in the standard configuration file. But you want to generate a comment file, so use pyinstalive -gc /--generate-comments .json file

Thank you