{"id":22691991,"url":"https://github.com/python3webspider/douyin","last_synced_at":"2025-04-04T15:10:00.208Z","repository":{"id":57423789,"uuid":"154452060","full_name":"Python3WebSpider/DouYin","owner":"Python3WebSpider","description":"API of DouYin for Humans used to Crawl Popular Videos and Musics","archived":false,"fork":false,"pushed_at":"2020-01-29T03:33:36.000Z","size":588,"stargazers_count":652,"open_issues_count":14,"forks_count":260,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-03-28T14:09:13.065Z","etag":null,"topics":["crawler","douyin","spider","videos"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Python3WebSpider.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-24T06:44:55.000Z","updated_at":"2025-03-24T17:03:47.000Z","dependencies_parsed_at":"2022-08-30T03:50:44.993Z","dependency_job_id":null,"html_url":"https://github.com/Python3WebSpider/DouYin","commit_stats":null,"previous_names":["germey/douyin"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Python3WebSpider%2FDouYin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Python3WebSpider%2FDouYin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Python3WebSpider%2FDouYin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Python3WebSpider%2FDouYin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Python3WebSpider","download_url":"https://codeload.github.com/Python3WebSpider/DouYin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247198463,"owners_count":20900080,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crawler","douyin","spider","videos"],"created_at":"2024-12-10T01:13:14.524Z","updated_at":"2025-04-04T15:10:00.189Z","avatar_url":"https://github.com/Python3WebSpider.png","language":"Python","readme":"注：项目已不可用...\n\n# DouYin\n\nAPI of DouYin App for humans.\n\n## Installation\n\n```\npip3 install douyin\n```\n\n## Usage\n\nHere is the sample code:\n\n```python\nimport douyin\nfrom douyin.structures import Topic, Music\n\n# define file handler and specify folder\nvideo_file_handler = douyin.handlers.VideoFileHandler(folder='./videos')\nmusic_file_handler = douyin.handlers.MusicFileHandler(folder='./musics')\n# define mongodb handler\nmongo_handler = douyin.handlers.MongoHandler()\n# define downloader\ndownloader = douyin.downloaders.VideoDownloader([mongo_handler, video_file_handler, music_file_handler])\n\nfor result in douyin.hot.trend():\n    for item in result.data:\n        # download videos of topic/music for 100 max per\n        downloader.download(item.videos(max=100))\n```\n\nthen you can get:\n\n```\nItem \u003cTopic: \u003c1565818716518401, panama\u003e\u003e\nProcessing \u003cVideo: \u003c6616517521098935565, 真香#panama\u003e\u003e ...\nProcessing \u003cVideo: \u003c6500385230921141518, 哈哈哈哈哈\u003e\u003e ...\n...\nProcessing \u003cVideo: \u003c6479958542747962637, 👅ก่อนกินข้\u003e\u003e ...\nProcessing \u003cVideo: \u003c6473811426107460878, 😁\u003e\u003e ...\n0%|                                                      | 0/10 [00:00\u003c?, ?it/s]\nProcessing 1-10 of files\nProcessing \u003cVideo: \u003c6616517521098935565, 真香#panama\u003e\u003e ...\nSaving \u003cVideo: \u003c6616517521098935565, 真香#panama\u003e\u003e to mongodb...\nProcessing \u003cVideo: \u003c6500385230921141518, 哈哈哈哈哈\u003e\u003e ...\nSaving \u003cVideo: \u003c6500385230921141518, 哈哈哈哈哈\u003e\u003e to mongodb...\nProcessing \u003cVideo: \u003c6562690160868199693, 皇城相府版C哩C哩跨\u003e\u003e ...\n....\nDownloading \u003cVideo: \u003c6580510322468064526, 第二遍 后面的小哥哥\u003e\u003e ...\nSaved \u003cVideo: \u003c6479958542747962637, 👅ก่อนกินข้\u003e\u003e to mongodb successfully\nDownloading \u003cVideo: \u003c6479958542747962637, 👅ก่อนกินข้\u003e\u003e ...\nSaved \u003cVideo: \u003c6473811426107460878, 😁\u003e\u003e to mongodb successfully\nDownloading \u003cVideo: \u003c6473811426107460878, 😁\u003e\u003e ...\nDownloaded file to ./videos/6580510322468064526.mp4\n10%|████▌                                         | 1/10 [00:01\u003c00:16,  1.84s/it]\nDownloaded file to ./videos/6516746291806997763.mp4\n20%|█████████▏                                    | 2/10 [00:01\u003c00:10,  1.33s/it]\nDownloaded file to ./videos/6600742831352974596.mp4\n40%|██████████████████▍                           | 4/10 [00:02\u003c00:05,  1.03it/s]\nDownloaded file to ./videos/6484393014599879950.mp4\n50%|███████████████████████                       | 5/10 [00:02\u003c00:04,  1.15it/s]\nDownloaded file to ./videos/6616517521098935565.mp4\n60%|███████████████████████████▌                  | 6/10 [00:03\u003c00:03,  1.27it/s]\nDownloaded file to ./videos/6479958542747962637.mp4\n70%|████████████████████████████████▏             | 7/10 [00:03\u003c00:01,  1.68it/s]\nDownloaded file to ./videos/6472305134377372941.mp4\n80%|████████████████████████████████████▊         | 8/10 [00:03\u003c00:00,  2.05it/s]\nDownloaded file to ./videos/6562690160868199693.mp4\n90%|█████████████████████████████████████████▍    | 9/10 [00:04\u003c00:00,  2.27it/s]\nDownloaded file to ./videos/6500385230921141518.mp4\n100%|█████████████████████████████████████████████| 10/10 [00:04\u003c00:00,  2.33it/s]\n```\n\n![](https://ws2.sinaimg.cn/large/006tNbRwgy1fwmad1yh6wj30lf0p3aaf.jpg)\n\n![](https://ws3.sinaimg.cn/large/006tNbRwly1fwo1ystiraj30lg0e3gm0.jpg)\n\n![](https://ws3.sinaimg.cn/large/006tNbRwly1fwo20dbzduj30lg0e3q49.jpg)\n\n![](https://ws2.sinaimg.cn/large/006tNbRwly1fwo21zyfkyj30jm0m175e.jpg)\n\n## Examples\n\nSee [examples](./examples)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpython3webspider%2Fdouyin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpython3webspider%2Fdouyin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpython3webspider%2Fdouyin/lists"}