Crates.io | fake_user_agent |
lib.rs | fake_user_agent |
version | 0.2.1 |
source | src |
created_at | 2023-05-07 01:42:24.577222 |
updated_at | 2024-03-14 20:18:02.153706 |
description | A simple library for getting random user agents for rust. |
homepage | |
repository | https://github.com/Vrajs16/fake_user_agent |
max_upload_size | |
id | 858875 |
size | 506,479 |
A simple library for getting random user agents for rust.
Get a random user agent from Chrome, Opera, Firefox, Safari, Edge, or Internet Explorer:
use fake_user_agent::get_rua;
let rua = get_rua(); // &'static str
If you want a specific type of browser user agent, you can use the following:
Get a random Chrome user agent:
use fake_user_agent::get_chrome_rua;
let rua = get_chrome_rua(); // &'static str
Get a random Opera user agent:
use fake_user_agent::get_opera_rua;
let rua = get_opera_rua(); // &'static str
Get a random Firefox user agent:
use fake_user_agent::get_firefox_rua;
let rua = get_firefox_rua(); // &'static str
Get a random Safari user agent:
use fake_user_agent::get_safari_rua;
let rua = get_safari_rua(); // &'static str
Get a random Edge user agent:
use fake_user_agent::get_edge_rua;
let rua = get_edge_rua(); // &'static str
Get a random Internet Explorer user agent:
use fake_user_agent::get_ie_rua;
let rua = get_ie_rua(); // &'static str