UserAgent in JSOUP?

I have always seen everywhere in JSOUP code.

Useragent installed in Mozilla.

What if I want to install it in google chrome or opera?

 Jsoup.connect(url) .userAgent("Mozilla"); 

How can i achieve this? Thanks in advance.

+6
source share
1 answer

there:

http://www.useragentstring.com/pages/Opera/ or http://www.useragentstring.com/pages/Chrome/

and get the one you like.

eg:

 Jsoup.connect(url).userAgent("Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; fr) Presto/2.9.168 Version/11.52"); 
+12
source

Source: https://habr.com/ru/post/913392/


All Articles