Tiktok-API-Python icon indicating copy to clipboard operation
Tiktok-API-Python copied to clipboard

No module named 'TiktokApi.browser'

Open lazezo2 opened this issue 2 years ago • 10 comments

thanks for the update, i already test it but didn't work so thought it's still under progress.... using any example like user feed example
this error happen

`ModuleNotFoundError Traceback (most recent call last)

in () ----> 1 from TiktokApi import * 2 3 Api = Tiktok() 4 5 # nhập tên người dùng

1 frames

/content/TiktokApi/api.py in () 8 import pickle 9 from urllib.parse import urlencode, quote ---> 10 from .browser import Browser 11 from .ultis import set_url, get_param_url 12 from .encryption import get_tt_param

ModuleNotFoundError: No module named 'TiktokApi.browser'`

i am using google colab, any help will be appreciated

lazezo2 avatar Jun 10 '22 21:06 lazezo2

thanks for the update, i already test it but didn't work so thought it's still under progress.... using any example like user feed example this error happen

`ModuleNotFoundError Traceback (most recent call last)

in () ----> 1 from TiktokApi import * 2 3 Api = Tiktok() 4 5 # nhập tên người dùng

1 frames

/content/TiktokApi/api.py in () 8 import pickle 9 from urllib.parse import urlencode, quote ---> 10 from .browser import Browser 11 from .ultis import set_url, get_param_url 12 from .encryption import get_tt_param

ModuleNotFoundError: No module named 'TiktokApi.browser'`

i am using google colab, any help will be appreciated

you need all the modules for it to work, I've only tested it on Windows

demon071 avatar Jun 11 '22 01:06 demon071

is there any work around to make it work in google colab? may be using chromium instead of browser or passing tiktok cookies manually to tiktok-api?

`# install chromium, its driver, and selenium !apt-get update !apt install chromium-chromedriver !cp /usr/lib/chromium-browser/chromedriver /usr/bin !pip install selenium

set options to be headless, ..

from selenium import webdriver options = webdriver.ChromeOptions() options.add_argument('--headless') options.add_argument('--no-sandbox') options.add_argument('--disable-dev-shm-usage')

open it, go to a website, and get results

wd = webdriver.Chrome('chromedriver',options=options) wd.get("https://www.website.com") print(wd.page_source) # results`

lazezo2 avatar Jun 11 '22 09:06 lazezo2

for it to work on Colab i think need to use requests and some method of getting datapost encoding

demon071 avatar Jun 12 '22 01:06 demon071

can you give me an example?

lazezo2 avatar Jun 12 '22 09:06 lazezo2

can you please mange it to work with google colab

  • browser..cp39-win_amd64
  • encryption.cp39-win_amd64

lazezo2 avatar Jun 13 '22 00:06 lazezo2

Had the same problem while running on Jupyter. ModuleNotFoundError: No module named 'TiktokApi.browser'

pip install the modules inside requirements.txt. And the browser and encryption pyd files are inside the TiktokApi folder. Did I miss out something?

ghis21 avatar Jun 13 '22 07:06 ghis21

Had the same problem while running on Jupyter. ModuleNotFoundError: No module named 'TiktokApi.browser'

pip install the modules inside requirements.txt. And the browser and encryption pyd files are inside the TiktokApi folder. Did I miss out something?

ok, seems like just need to remove the middle string from "browser.cp39-win_amd64.pyd" to "browser.pyd".

ghis21 avatar Jun 13 '22 10:06 ghis21

this module extension build for windows and will not work in other system.....

  • browser..cp39-win_amd64
  • encryption.cp39-win_amd64

can you please make another build for those modules to work in google colab

lazezo2 avatar Jun 13 '22 11:06 lazezo2

ok i will check on colab

demon071 avatar Jun 14 '22 12:06 demon071

ok i will check on colab

any news

lazezo2 avatar Jun 18 '22 08:06 lazezo2