{"id":19197701,"url":"https://github.com/eddycjy/fake-useragent","last_synced_at":"2025-05-16T06:05:58.325Z","repository":{"id":38418123,"uuid":"134062580","full_name":"eddycjy/fake-useragent","owner":"eddycjy","description":"A wide variety of random useragents","archived":false,"fork":false,"pushed_at":"2019-12-02T22:05:19.000Z","size":74,"stargazers_count":455,"open_issues_count":7,"forks_count":75,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-08T16:04:29.132Z","etag":null,"topics":["fake","go","golang","useragent"],"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/eddycjy.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-05-19T13:05:53.000Z","updated_at":"2025-04-02T17:07:28.000Z","dependencies_parsed_at":"2022-09-02T05:22:20.220Z","dependency_job_id":null,"html_url":"https://github.com/eddycjy/fake-useragent","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddycjy%2Ffake-useragent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddycjy%2Ffake-useragent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddycjy%2Ffake-useragent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddycjy%2Ffake-useragent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eddycjy","download_url":"https://codeload.github.com/eddycjy/fake-useragent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254478188,"owners_count":22077676,"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":["fake","go","golang","useragent"],"created_at":"2024-11-09T12:17:51.623Z","updated_at":"2025-05-16T06:05:53.307Z","avatar_url":"https://github.com/eddycjy.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fake Useragent ![image](https://api.travis-ci.org/EDDYCJY/fake-useragent.svg?branch=master)\n\nA wide variety of random useragents\n\n[简体中文](https://github.com/EDDYCJY/fake-useragent/blob/master/README_ZH.md)\n\n## Support\n\n- All User-Agent Random\n- Chrome\n- InternetExplorer (IE)\n- Firefox\n- Safari\n- Android\n- MacOSX\n- IOS\n- Linux\n- IPhone\n- IPad\n- Computer\n- Mobile\n\n## Installation\n\n```\n$ go get github.com/EDDYCJY/fake-useragent\n```\n\n## Usage\n\n``` go\npackage main\n\nimport (\n\t\"log\"\n\n\t\"github.com/EDDYCJY/fake-useragent\"\n)\n\nfunc main() {\n\t// recommend to use\n\trandom := browser.Random()\n\tlog.Printf(\"Random: %s\", random)\n\n\tchrome := browser.Chrome()\n\tlog.Printf(\"Chrome: %s\", chrome)\n\n\tinternetExplorer := browser.InternetExplorer()\n\tlog.Printf(\"IE: %s\", internetExplorer)\n\n\tfirefox := browser.Firefox()\n\tlog.Printf(\"Firefox: %s\", firefox)\n\n\tsafari := browser.Safari()\n\tlog.Printf(\"Safari: %s\", safari)\n\n\tandroid := browser.Android()\n\tlog.Printf(\"Android: %s\", android)\n\n\tmacOSX := browser.MacOSX()\n\tlog.Printf(\"MacOSX: %s\", macOSX)\n\n\tios := browser.IOS()\n\tlog.Printf(\"IOS: %s\", ios)\n\n\tlinux := browser.Linux()\n\tlog.Printf(\"Linux: %s\", linux)\n\n\tiphone := browser.IPhone()\n\tlog.Printf(\"IPhone: %s\", iphone)\n\n\tipad := browser.IPad()\n\tlog.Printf(\"IPad: %s\", ipad)\n\n\tcomputer := browser.Computer()\n\tlog.Printf(\"Computer: %s\", computer)\n\n\tmobile := browser.Mobile()\n\tlog.Printf(\"Mobile: %s\", mobile)\n}\n```\n\n### Customize\n\nYou can adjust the maximum number of crawl pages and time intervals, maximum timeouts. If not, it is the default.\n\n``` go\nclient := browser.Client{\n\tMaxPage: 3,\n\tDelay: 200 * time.Millisecond,\n\tTimeout: 10 * time.Second,\n}\ncache := browser.Cache{}\nb := browser.NewBrowser(client, cache)\n\nrandom := b.Random()\n```\n\nUpdate the browser temporary file cache (re-get the source to get the latest data).\n\n``` go\nclient := browser.Client{}\ncache := browser.Cache{\n\tUpdateFile: true,\n}\nb := browser.NewBrowser(client, cache)\n```\n\n## Output\n\n``` sh\nRandom: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36\n\nChrome: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36\n\nIE: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)\n\nFirefox: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0\n\nSafari: Mozilla/5.0 (iPhone; CPU iPhone OS 11_2_5 like Mac OS X) AppleWebKit/604.5.6 (KHTML, like Gecko) Version/11.0 Mobile/15D60 Safari/604.1\n\nAndroid: Mozilla/5.0 (Linux; Android 6.0; MYA-L22 Build/HUAWEIMYA-L22) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36\n\nMacOSX: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0.1 Safari/602.2.14\n\nIOS: Mozilla/5.0 (iPhone; CPU iPhone OS 10_1 like Mac OS X) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0 Mobile/14B72 Safari/602.1\n\nLinux: Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0\n\nIPhone: Mozilla/5.0 (iPhone; CPU iPhone OS 10_2 like Mac OS X) AppleWebKit/602.3.12 (KHTML, like Gecko) Version/10.0 Mobile/14C92 Safari/602.1\n\nIPad: Mozilla/5.0 (iPad; CPU OS 5_0_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A405 Safari/7534.48.3\n\nComputer: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0\n\nMobile: Mozilla/5.0 (Linux; Android 7.0; Redmi Note 4 Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.111 Mobile Safari/537.36\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feddycjy%2Ffake-useragent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feddycjy%2Ffake-useragent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feddycjy%2Ffake-useragent/lists"}