Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No module named 'TiktokApi.browser' #26

Closed
lazezo2 opened this issue Jun 10, 2022 · 10 comments
Closed

No module named 'TiktokApi.browser' #26

lazezo2 opened this issue Jun 10, 2022 · 10 comments

Comments

@lazezo2
Copy link

lazezo2 commented Jun 10, 2022

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

@demon071
Copy link
Owner

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

@lazezo2
Copy link
Author

lazezo2 commented Jun 11, 2022

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`

@demon071
Copy link
Owner

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

@lazezo2
Copy link
Author

lazezo2 commented Jun 12, 2022

can you give me an example?

@lazezo2
Copy link
Author

lazezo2 commented Jun 13, 2022

can you please mange it to work with google colab

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

@ghis21
Copy link

ghis21 commented Jun 13, 2022

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
Copy link

ghis21 commented Jun 13, 2022

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".

@lazezo2
Copy link
Author

lazezo2 commented Jun 13, 2022

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

@demon071
Copy link
Owner

ok i will check on colab

@lazezo2
Copy link
Author

lazezo2 commented Jun 18, 2022

ok i will check on colab

any news

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants