Michele0303 / tiktok-live-recorder

🎥✨ A TikTok live streaming recorder tool written in Python. Capture and relive your favorite TikTok moments effortlessly. 🎥✨
MIT License
373 stars 102 forks source link

Splits lives up into a bunch of small files #22

Closed spinningsand closed 1 year ago

spinningsand commented 1 year ago

And it will also make the same file a bunch of times (around 5-20 seconds long). Only seems to happen sometimes, though.

spinningsand commented 1 year ago

And also, the same people this happens on, when I try their user name, I get this 500 Internal Server Error and also this:

[*] RECORDING...
Traceback (most recent call last):
  File "C:\Users\CLUNKYBOXCOMPUTER\AppData\Local\Programs\Python\Python311\Lib\site-packages\youtube_dl\extractor\__init__.py", line 4, in <module>
    from .lazy_extractors import *
ModuleNotFoundError: No module named 'youtube_dl.extractor.lazy_extractors'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\CLUNKYBOXCOMPUTER\AppData\Local\Programs\Python\Python311\Scripts\youtube-dl.exe\__main__.py", line 4, in <module>
  File "C:\Users\CLUNKYBOXCOMPUTER\AppData\Local\Programs\Python\Python311\Lib\site-packages\youtube_dl\__init__.py", line 43, in <module>
    from .extractor import gen_extractors, list_extractors
  File "C:\Users\CLUNKYBOXCOMPUTER\AppData\Local\Programs\Python\Python311\Lib\site-packages\youtube_dl\extractor\__init__.py", line 9, in <module>
    from .extractors import *
  File "C:\Users\CLUNKYBOXCOMPUTER\AppData\Local\Programs\Python\Python311\Lib\site-packages\youtube_dl\extractor\extractors.py", line 400, in <module>
    from .franceinter import FranceInterIE
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 936, in exec_module
  File "<frozen importlib._bootstrap_external>", line 1032, in get_code
  File "<frozen importlib._bootstrap_external>", line 1130, in get_data
KeyboardInterrupt
^CTraceback (most recent call last):
  File "C:\Users\CLUNKYBOXCOMPUTER\TikTok-Live-Recorder\main.py", line 141, in <module>
    main()
  File "C:\Users\CLUNKYBOXCOMPUTER\TikTok-Live-Recorder\main.py", line 136, in main
    start_recording(user, room_id)
  File "C:\Users\CLUNKYBOXCOMPUTER\TikTok-Live-Recorder\main.py", line 72, in start_recording
    os.system(f"youtube-dl --hls-prefer-ffmpeg --no-continue --no-part -o {output} {live_url}")

It sometimes works when I do the room id, but I also get this:

Traceback (most recent call last):
  File "C:\Users\CLUNKYBOXCOMPUTER\TikTok-Live-Recorder\main.py", line 141, in <module>
    main()
  File "C:\Users\CLUNKYBOXCOMPUTER\TikTok-Live-Recorder\main.py", line 135, in main
    room_id = get_room_id(user)
              ^^^^^^^^^^^^^^^^^
  File "C:\Users\CLUNKYBOXCOMPUTER\TikTok-Live-Recorder\main.py", line 25, in get_room_id
    response = req.get(tiktok_url)
               ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\CLUNKYBOXCOMPUTER\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\api.py", line 73, in get
    return request("get", url, params=params, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\CLUNKYBOXCOMPUTER\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\CLUNKYBOXCOMPUTER\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\CLUNKYBOXCOMPUTER\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\CLUNKYBOXCOMPUTER\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\adapters.py", line 489, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "C:\Users\CLUNKYBOXCOMPUTER\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
                       ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\CLUNKYBOXCOMPUTER\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 386, in _make_request
    self._validate_conn(conn)
  File "C:\Users\CLUNKYBOXCOMPUTER\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 1042, in _validate_conn
    conn.connect()
  File "C:\Users\CLUNKYBOXCOMPUTER\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connection.py", line 358, in connect
    self.sock = conn = self._new_conn()
                       ^^^^^^^^^^^^^^^^
  File "C:\Users\CLUNKYBOXCOMPUTER\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connection.py", line 174, in _new_conn
    conn = connection.create_connection(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\CLUNKYBOXCOMPUTER\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\util\connection.py", line 85, in create_connection
    sock.connect(sa)
spinningsand commented 1 year ago

I also just noticed that it glitches out and doesn't record the full live sometimes either. I was just on a live that lasted for over an hour and it only recorded 14 minutes of it.

Michele0303 commented 1 year ago

https://github.com/Michele0303/TikTok-Live-Recorder/releases/tag/2.9

spinningsand commented 1 year ago

I'm still having the same issues.

Michele0303 commented 1 year ago

Send me the logs files.