dfreelon / pyktok

A simple module to collect video, text, and metadata from Tiktok.
BSD 3-Clause "New" or "Revised" License
316 stars 44 forks source link

Can't import pyktok because missing LibreWolf profile directory? #23

Closed katbrooks615 closed 11 months ago

katbrooks615 commented 1 year ago

Hi,

I'm using Python through Jupyter Notebooks on Firefox's browser. I've successfully installed pyktok, but it isn't letting me import pyktok as pyk. It's returning FileNotFoundError: Could not find LibreWolf profile directory. Do I need to install LibreWolf to use pyktok?

Thanks!

dfreelon commented 1 year ago

I hadn't heard of LibreWolf before you posted this issue, so I'm pretty sure it's not a pyktok dependency. Maybe try a different browser or Python shell?

pkreissel commented 1 year ago

It is part of browser_cookie3==0.19 If you downgrade to browser_cookie3==0.18 the error disappears. However it seems browser cookie itself is super unreliable, so I would suggest to use another dependency entirely.

krisfur commented 1 year ago

The issue is indeed with browser_cookie3, namely the cookies = browser_cookie3.load() call in pyktok.py at line 40 -> if you change it to a specific browser instead like cookies = browser_cookie3.chrome(domain_name='www.tiktok.com') it works again.

dfreelon commented 11 months ago

This has been fixed.