Random User Agent generator
This commit is contained in:
parent
ecba96eaf4
commit
eeaa8cdf1c
2 changed files with 71 additions and 25 deletions
|
|
@ -164,7 +164,11 @@ class Wrappers {
|
|||
}
|
||||
}
|
||||
|
||||
$options["user_agent"] = Misc::env("USER_AGENT", TikScraperUserAgents::DEFAULT);
|
||||
$customUa = Misc::env("USER_AGENT", '');
|
||||
|
||||
if ($customUa) {
|
||||
$options['user_agent'] = $customUa;
|
||||
}
|
||||
|
||||
return new \TikScraper\Api($options, $cacheEngine);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue