{"id":21928668,"url":"https://github.com/resolvewang/shutdownmypc","last_synced_at":"2025-09-07T08:33:23.514Z","repository":{"id":87963469,"uuid":"70061007","full_name":"ResolveWang/ShutdownMyPC","owner":"ResolveWang","description":"ShutdownMyPC remotely by microblog","archived":false,"fork":false,"pushed_at":"2016-10-05T13:27:09.000Z","size":9375,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-22T12:28:18.610Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ResolveWang.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-05T13:03:43.000Z","updated_at":"2016-10-31T02:44:11.000Z","dependencies_parsed_at":"2023-06-19T09:22:39.458Z","dependency_job_id":null,"html_url":"https://github.com/ResolveWang/ShutdownMyPC","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ResolveWang/ShutdownMyPC","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ResolveWang%2FShutdownMyPC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ResolveWang%2FShutdownMyPC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ResolveWang%2FShutdownMyPC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ResolveWang%2FShutdownMyPC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ResolveWang","download_url":"https://codeload.github.com/ResolveWang/ShutdownMyPC/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ResolveWang%2FShutdownMyPC/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270278395,"owners_count":24557179,"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","status":"online","status_checked_at":"2025-08-13T02:00:09.904Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-28T22:27:25.563Z","updated_at":"2025-08-13T17:10:25.614Z","avatar_url":"https://github.com/ResolveWang.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 项目目的\n你是否会有本人不在办公室或者实验室而电脑还运行着，但是某个时刻需要关闭的情况呢？这个小项目就是为了完成这个功能，使用微博进行远程关机\n\n## 项目依赖\n- 模拟登陆+页面解析：requests+pyexecjs+beautifulsoup\\\n - pip install requests\n - pip install bs4\n - pip install PyExecJS\n\n- 命令行解析：docopt\n - pip install docopt\n \n- phantomjs\n - windows:在[phantomjs官网](http://phantomjs.org/)下载它，并且把它的路径添加到环境变量中\n - ubuntu：*sudo apt-get install phantomjs* 或者到官网下载并且添加到环境变量中\n \n## 思路\n1. 定时模拟登陆（定时是因为微博cookie**24小时**失效）,关于模拟登陆可以参看[我的博文](http://www.rookiefly.cn/detail/83)和[github项目](https://github.com/ResolveWang/smart_login)\n2. 定时(10分钟)获取最新一条微博，并把发布时间和系统时间做比较，如果相差半个小时以内，就执行关机命令\n3. 让程序开机启动，随时监听\n\n## 使用\n- 命令行\n\u003e python pc_shutdown.py name weibo_account password weibo_password\n\n- exe文件(我使用的rsa库直接登陆(而非phantomjs方式)，所以如果只是试试效果，那么就可以用这个\n\u003e pc_shutdown.exe name weibo_account password weibo_password\n\n- 微博状态\n\u003e 关机 20   \n\n这里\"关机\"两个字是必须的，\"20\"是20分钟过后关机，中间用空格隔开，如果不带参数，那么立即关机\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fresolvewang%2Fshutdownmypc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fresolvewang%2Fshutdownmypc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fresolvewang%2Fshutdownmypc/lists"}