OwenTruong / civitdl

A CLI python script to batch download models from CivitAI with CivitAI Api V1
Apache License 2.0
46 stars 6 forks source link

Feat/request session #55

Closed OwenTruong closed 8 months ago

OwenTruong commented 8 months ago

Summary

Related Issues: Closes #54

Comments:

According to the two link below, using request.Session with threads are fine as long as there is only a low number of hosts and we are not modifying anything related to cookies. For this repo, we don't use cookies and the only host we make requests to is CivitAI.

https://stackoverflow.com/questions/18188044/is-the-session-object-from-pythons-requests-library-thread-safe https://github.com/ross/requests-futures/issues/47