import asyncio from douyin_tiktok_scraper.scraper import Scraper import traceback api = Scraper() async def hybrid_parsing(url: str) -> dict: try: result = await api.hybrid_parsing(url) print(f"The hybrid parsing result:\n {result}") return result except Exception as e: print(f"An error occurred: {str(e)}") print("Traceback:") traceback.print_exc() return None async def main(): url = input("Paste Douyin/TikTok/Bilibili share URL here: ") result = await hybrid_parsing(url) if result: print("Parsing successful!") else: print("Parsing failed.") asyncio.run(main())