{"id":20608758,"url":"https://github.com/andeya/surfer","last_synced_at":"2025-04-09T21:18:13.470Z","repository":{"id":57483884,"uuid":"37431471","full_name":"andeya/surfer","owner":"andeya","description":"Package surfer is a high level concurrency http client. It has surf andphantom download engines, highly simulated browser behavior, the function of analog login and so on.","archived":false,"fork":false,"pushed_at":"2022-06-26T17:17:59.000Z","size":1310,"stargazers_count":220,"open_issues_count":1,"forks_count":63,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-04-09T21:18:08.720Z","etag":null,"topics":["client","restful-client"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andeya.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":"2015-06-14T22:08:30.000Z","updated_at":"2025-02-26T08:41:32.000Z","dependencies_parsed_at":"2022-08-27T20:02:47.602Z","dependency_job_id":null,"html_url":"https://github.com/andeya/surfer","commit_stats":null,"previous_names":["henrylee2cn/surfer"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andeya%2Fsurfer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andeya%2Fsurfer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andeya%2Fsurfer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andeya%2Fsurfer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andeya","download_url":"https://codeload.github.com/andeya/surfer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248111973,"owners_count":21049578,"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":["client","restful-client"],"created_at":"2024-11-16T10:11:47.988Z","updated_at":"2025-04-09T21:18:13.434Z","avatar_url":"https://github.com/andeya.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Surfer [![GitHub release](https://img.shields.io/github/release/andeya/surfer.svg?style=flat-square)](https://github.com/andeya/surfer/releases) [![report card](https://goreportcard.com/badge/github.com/andeya/surfer?style=flat-square)](http://goreportcard.com/report/andeya/surfer) [![github issues](https://img.shields.io/github/issues/andeya/surfer.svg?style=flat-square)](https://github.com/andeya/surfer/issues?q=is%3Aopen+is%3Aissue) [![github closed issues](https://img.shields.io/github/issues-closed-raw/andeya/surfer.svg?style=flat-square)](https://github.com/andeya/surfer/issues?q=is%3Aissue+is%3Aclosed) [![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](http://godoc.org/github.com/andeya/surfer) [![view Go大数据](https://img.shields.io/badge/官方QQ群-Go大数据(42731170)-27a5ea.svg?style=flat-square)](http://jq.qq.com/?_wv=1027\u0026k=XnGGnc)\r\n\r\nPackage surfer is a high level concurrency http client.\r\nIt has `surf` and` phantom` download engines, highly simulated browser behavior, the function of analog login and so on.\r\n\r\n[简体中文](https://github.com/andeya/surfer/blob/master/README_ZH.md)\r\n\r\n## Features\r\n- Both `surf` and `phantomjs` engines are supported\r\n- Support random User-Agent\r\n- Support cache cookie\r\n- Support http/https\r\n\r\n## Usage\r\n```\r\npackage main\r\n\r\nimport (\r\n    \"github.com/andeya/surfer\"\r\n    \"io/ioutil\"\r\n    \"log\"\r\n)\r\n\r\nfunc main() {\r\n    // Use surf engine\r\n    resp, err := surfer.Download(\u0026surfer.Request{\r\n        Url: \"http://github.com/andeya/surfer\",\r\n    })\r\n    if err != nil {\r\n        log.Fatal(err)\r\n    }\r\n    b, err := ioutil.ReadAll(resp.Body)\r\n    log.Println(string(b), err)\r\n\r\n    // Use phantomjs engine\r\n    surfer.SetPhantomJsFilePath(\"Path to phantomjs.exe\")\r\n    resp, err = surfer.Download(\u0026surfer.Request{\r\n        Url:          \"http://github.com/andeya\",\r\n        DownloaderID: 1,\r\n    })\r\n    if err != nil {\r\n        log.Fatal(err)\r\n    }\r\n    b, err = ioutil.ReadAll(resp.Body)\r\n    log.Println(string(b), err)\r\n\r\n    resp.Body.Close()\r\n    surfer.DestroyJsFiles()\r\n}\r\n```\r\n[Full example](https://github.com/andeya/surfer/tree/master/example)\r\n\r\n## License\r\n\r\nSurfer is under Apache v2 License. See the [LICENSE](https://github.com/andeya/surfer/raw/master/LICENSE) file for the full license text.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandeya%2Fsurfer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandeya%2Fsurfer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandeya%2Fsurfer/lists"}