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

error when running challange (hashtag) #363

Open
vqoley opened this issue May 14, 2023 · 0 comments
Open

error when running challange (hashtag) #363

vqoley opened this issue May 14, 2023 · 0 comments

Comments

@vqoley
Copy link

vqoley commented May 14, 2023

Tokland is not working on youtube-upload anymore. However, @kootsoop is. If you prepare a PR, we'll gladly merge it. Any help, gratefully received.

Describe the bug
i try running tiktok challange api, my keyword "mlbb" after few second got this error:

File "C:\Python311\Lib\site-packages\tiktokapipy\api.py", line 355, in _scrape_data
    page.wait_for_selector("#SIGI_STATE", state="attached")
  File "C:\Python311\Lib\site-packages\playwright\sync_api\_generated.py", line 8286, in wait_for_selector
    self._sync(
  File "C:\Python311\Lib\site-packages\playwright\_impl\_sync_base.py", line 104, in _sync
    return task.result()
           ^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\playwright\_impl\_page.py", line 368, in wait_for_selector
    return await self._main_frame.wait_for_selector(**locals_to_params(locals()))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\playwright\_impl\_frame.py", line 322, in wait_for_selector
    await self._channel.send("waitForSelector", locals_to_params(locals()))
  File "C:\Python311\Lib\site-packages\playwright\_impl\_connection.py", line 61, in send
    return await self._connection.wrap_api_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\playwright\_impl\_connection.py", line 461, in wrap_api_call
    return await cb()
           ^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\playwright\_impl\_connection.py", line 96, in inner_send
    result = next(iter(done)).result()
             ^^^^^^^^^^^^^^^^^^^^^^^^^
playwright._impl._api_types.TimeoutError: Timeout 30000ms exceeded.
=========================== logs ===========================
waiting for locator("#SIGI_STATE")
============================================================
Traceback (most recent call last):
  File "C:\xampp8\htdocs\tiktokupload\runs.py", line 94, in <module>
  File "C:\xampp8\htdocs\tiktokupload\fungsi.py", line 56, in fromchallage
    for video in challenge.videos:
  File "C:\Python311\Lib\site-packages\tiktokapipy\api.py", line 90, in __next__
    out = self.fetch(self._next_up)
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\tiktokapipy\api.py", line 103, in fetch
    return self._api.video(video_link(self.light_models[idx].id))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\tiktokapipy\api.py", line 316, in video
    response, api_extras = self._scrape_data(
                           ^^^^^^^^^^^^^^^^^^
  File "C:\Python311\Lib\site-packages\tiktokapipy\api.py", line 370, in _scrape_data
    raise TikTokAPIError(

my code:

with TikTokAPI() as api:
        challenge = api.challenge(keyword)
        for video in challenge.videos:
            times = int(time.time())
            id = video.id
            # stats = video.stats
            # create_time = video.create_time
            description = video.desc
            # video_cover = video.video.cover
            video_duration = video.video.duration
            # video_ratio = video.video.ratio
            # video_origin_cover = video.video.origin_cover
            # video_dynamic_cover = video.video.dynamic_cover
            author = video.author

Expected behavior
A clear and concise description of what you expected to happen.

Desktop (please complete the following information):

  • OS: windows 10
  • Python Version : python version 3.11

Additional context
all requirement is latest and can i know what is the problem?

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

1 participant