Michele0303 / tiktok-live-recorder

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

Can't get room_id without log in #73

Closed lotaf99 closed 11 months ago

lotaf99 commented 1 year ago

can't get room_id without login, if we type command with user parameter we can't get room_id

Screenshot 2023-09-06 at 19 04 54 Screenshot 2023-09-06 at 19 05 10

while we inspect element from tiktok.com/@(user)/live , we can see the room_id in area

Screenshot 2023-09-06 at 19 12 45
EnigmaAstera commented 1 year ago

yeah i have same problem too whilue using -user it failed to get the room_id but if we use the room id instead of user its work as usual

jackingpanda commented 1 year ago

my script is also like this, have been 2 days. trying to make a solving script with this too, but no luck.

        # Step 3: Cari room ID dalam tag <meta>
        soup = BeautifulSoup(response.text, 'html.parser')
        meta_tags = soup.find_all('meta', {'content': re.compile(r'snssdk1180://live\?room_id=\d+')})
        if meta_tags:
            room_id = re.search(r'room_id=(\d+)', meta_tags[0]['content']).group(1)
        else:
            logging.error(f"Tidak dapat menemukan room ID untuk @{username}. URL mungkin tidak valid.")
            print(f"Tidak dapat menemukan room ID untuk @{username}. URL mungkin tidak valid.")
            return