{"id":39810896,"url":"https://github.com/ericlingit/weibo-trending","last_synced_at":"2026-01-18T12:44:02.939Z","repository":{"id":63161206,"uuid":"562935011","full_name":"ericlingit/weibo-trending","owner":"ericlingit","description":"Scrape trending Weibo posts.","archived":false,"fork":false,"pushed_at":"2022-12-05T06:56:18.000Z","size":1330,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-28T02:26:58.426Z","etag":null,"topics":["weibo"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ericlingit.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":"2022-11-07T15:07:41.000Z","updated_at":"2023-07-06T13:56:28.000Z","dependencies_parsed_at":"2023-01-23T00:25:13.297Z","dependency_job_id":null,"html_url":"https://github.com/ericlingit/weibo-trending","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/ericlingit/weibo-trending","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericlingit%2Fweibo-trending","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericlingit%2Fweibo-trending/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericlingit%2Fweibo-trending/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericlingit%2Fweibo-trending/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericlingit","download_url":"https://codeload.github.com/ericlingit/weibo-trending/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericlingit%2Fweibo-trending/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28536008,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T10:13:46.436Z","status":"ssl_error","status_checked_at":"2026-01-18T10:13:11.045Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["weibo"],"created_at":"2026-01-18T12:44:02.847Z","updated_at":"2026-01-18T12:44:02.924Z","avatar_url":"https://github.com/ericlingit.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Weibo trending posts scraper\n\nScrap trending posts from Weibo front page.\n\n\u003c!--\nFor notes detailing Weibo API endpoints and their responses, see the wiki:\nhttps://github.com/ericlingit/weibo-trending/wiki/Weibo-API\n--\u003e\n\n## Usage guide\n\n### As a library\n\nInstall\n\n`pip install weibo-trending`\n\nGet and parse posts\n\n```python\nfrom weibo_trending import get_new_posts, parse_response\n\nresp = get_new_posts()\nmblogs = parse_response(resp)\nfor mblog in mblogs:\n    print(mblog)\n```\n\nGet and parse comments\n\n```python\nfrom weibo_trending import get_raw_comments, parse_comments\n\nexample_post_id = \"4840673008419178\"\nraw_cmt = get_raw_comments(example_post_id)\ncomments = parse_comments(raw_cmt)\nfor c in comments:\n    print(c)\n```\n\n### As a command line tool\n\nInstall\n\n`pip install weibo-trending`\n\nUsage\n\n```\npython -m weibo_trending --help\n\n    usage: weibo_trending [-h] [-d DIR] [-s]\n\n    Scrape and parse Weibo trending posts.\n\n    optional arguments:\n    -h, --help          show this help message and exit\n    -d DIR, --dir DIR   specify the output directory. Defaults to the current working directory\n    -s, --skip-parsing  whether to skip parsing and dump the raw JSON response from Weibo\n\n\npython -m weibo_trending\n```\n\nweibo_trending will save each scraped post with the following filename format:\n- `weibo_\u003cuser ID\u003e_\u003cpost ID\u003e.json`\n- Example: `weibo_1631153043_4834313265233660.json`\n\nEach call to weibo_trending usually saves 10 new files. If you get fewer than 10, that means the response contains one or more deleted posts. They are not saved.\n\n## Develop\n\n```\ngit clone https://github.com/ericlingit/weibo-trending.git\ncd weibo-trending\npython3 -m venv venv\nsource venv/bin/activate\npip install -U pip wheel\npip install -r requirements.txt\npip install -e .\npytest\n```\n\n### Package\n\n```\npython -m build --wheel\n```\n\nThe built wheel is in `./dist/`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericlingit%2Fweibo-trending","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericlingit%2Fweibo-trending","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericlingit%2Fweibo-trending/lists"}