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

hashtag metadata error #67

Closed
andrea-mar opened this issue Sep 23, 2024 · 6 comments
Closed

hashtag metadata error #67

andrea-mar opened this issue Sep 23, 2024 · 6 comments

Comments

@andrea-mar
Copy link

i am trying to get metadata for a specific hashtag with

pyk.save_tiktok_multi_page(HASHTAG,
                           ent_type='hashtag',
                           save_video=False,
                           metadata_fn=f'{HASHTAG}.csv',
                           browser_name='firefox')

When the following runs:

video_urls = asyncio.run(get_video_urls(tt_ent,
                                           ent_type,
                                     video_ct,
                                    headless))

I get:

RuntimeError: asyncio.run() cannot be called from a running event loop

@dfreelon
Copy link
Owner

Please post your IDE and OS... asyncio does not work with all IDEs.

@andrea-mar
Copy link
Author

OS : windows
IDE : VS code

@dfreelon
Copy link
Owner

Great. My advice is to try the code on a plain command line or Powershell and see if it makes any difference.

@andrea-mar
Copy link
Author

thank you so much for the prompt responses!

i tried running it in the command line . it still errors


Lib\site-packages\playwright\_impl\_connection.py", line 514, in wrap_api_call
    raise rewrite_error(error, f"{parsed_st['apiName']}: {error}") from None
playwright._impl._errors.Error: Page.evaluate: ReferenceError: opts is not defined
    at Navigator.get [as userAgent] (<anonymous>:11:42)
    at eval (eval at evaluate (:234:30), <anonymous>:1:17)
    at UtilityScript.evaluate (<anonymous>:241:19)
    at UtilityScript.<anonymous> (<anonymous>:1:44)

@dfreelon
Copy link
Owner

That is a different error. I suggest you check here: #63

@andrea-mar
Copy link
Author

uninstall playwright and then reinstall playwright version = 1.37 and playwright install worked!
Thank you for your super prompt responses 🥇 !

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

2 participants