Questions tagged [user-agent]

A user agent is a piece of software (a software agent) that acts on behalf of a user. The term is often used to refer to browsers, and other software that sends network requests. In the HTTP protocol, a user agent identifies itself to the server using a user-agent string. The user-agent string is a string in the header of an HTTP request that identifies the browser, version, device, os, and other information about the device from which the request came.

user-agent
Filter by
Sorted by
Tagged with
0 votes
2 answers
943 views

Incompatible browser when loading WKWebview

I am getting an "Incompatible Browser" error when trying to load a website using WKWebview. The same website loads fine using the Safari browser. I have also tried setting the user agent of ...
2 votes
0 answers
762 views

ModuleNotFoundError: No module named 'fake_useragent'

I successfully downloaded fake_useragent module (and double checked it), but I still make my code running, I get the same mistake "ModuleNotFoundError: No module named 'fake_useragent'" My ...
2 votes
1 answer
4k views

How to change the displayed operating system information within the useragent using Selenium and Python?

I'm building a bot that will change it's appearance based on the random user agent I select. I pull from a list of user agents, depending on the one selected, I change the capability of the webdriver ...
8 votes
3 answers
3k views

How to detect web crawlers for SEO, using Express?

I've been searching for npm packages but they all seem unmaintained and rely on the outdated user-agent databases. Is there a reliable and up-to-date package out there that helps me detect crawlers? (...
0 votes
0 answers
39 views

How to get package manager information for linux from browser

I want to get Linux package manager(deb, rpm, etc.)information from the web browser using Javascript. Is there a way to do this?
1 vote
1 answer
2k views

How to get the current user agent used by WebView before load an url?

I'm looking for a way to get the actual Flutter Webview User Agent before loading an url. It seems not be possible...
0 votes
2 answers
1k views

Apache webserver: Fall back to http/1.1 Protocol only for certain user-agent

I would like the Apache webserver to normally deliver content with the "http/2"-Protocol, but to fall back to "http/1.1" if the connection stems from a certain user-agent, which ...
0 votes
2 answers
2k views

Which user-agent string can I use for web.whatsapp.com?

I am using mobilefx browser based on Chromium. I am using it to navigate to web.whatsapp.com. It used to work fine. Since today (June, 14th, 2022) this website doesn't work anymore and says that I ...
0 votes
0 answers
269 views

Global Okhttp3 interceptor in Spring Boot

Is there a way to set a global interceptor for Okhttp3 in a Spring Boot application? The goal is to set a custom User-agent header for all the requests (without having to modify every single piece of ...
1 vote
1 answer
244 views

Finding the right user-agent for a specific website

I am using link-preview-js NPM Package to fetch a website's title, description and image. However, I am not receiving correct data for a specific website. Website: https://www.britishcouncil.pk/exam/...
1 vote
2 answers
3k views

BigQuery SQL User Agent Detecting

How is it possible to extract information about Device Type Browser, OS and etc. from the user agent string as : Mozilla/5.0 (Linux; Android 10; SM-A307G Build/QP1A.190711.020; wv) AppleWebKit/537.36 (...
0 votes
0 answers
291 views

device-detector library doesn't work in php

I'm trying to figure out what users device model so my application allow them only with thier own registered device and I found this device-detector library(https://github.com/matomo-org/device-...
2 votes
0 answers
39 views

How does the apple website show different content, depending on your internet speed?

I would have phrased this question as 'How do websites measure the client internet speed?' or something. But I feel that this is a much more concrete example, and provides the correct context in which ...
2 votes
1 answer
1k views

Python Web Scrapping Error 403 even with header User Agent

I'm a newbie learning Python. While using BeautifulSoup and Requests to scrap "https://batdongsan.com.vn/nha-dat-ban-tp-hcm" for collect data on housing price of my hometown, I get blocked ...
3 votes
1 answer
7k views

How to set a custom name for the user-agent using Selenium and Python

I am using selenium + webdriver and trying testing different user agents. I am adding user agent like this for Chrome on Windows for example: option = Options() option.add_argument("user-agent=...
6 votes
3 answers
22k views

How to change the User Agent using Selenium and Python

I am having an error when changing the web driver user agent in Python using selenium. Here is my code: import requests import json from selenium import webdriver from selenium.webdriver.common....
105 votes
5 answers
239k views

Change user-agent for Selenium web-driver

I have the following code in Python: from selenium.webdriver import Firefox from contextlib import closing with closing(Firefox()) as browser: browser.get(url) I would like to print the user-...
0 votes
2 answers
2k views

Changing useragent of Firefox with Selenium through options add_argument?

The user agent is showing on the address bar like this http://user-agent=mozilla/5.0%20(Windows%20NT%2010.0;%20Win64;%20x64)%20AppleWebKit/537.36%20(KHTML,%20like%20Gecko)%20Chrome/87.0.4280.88%...
0 votes
2 answers
4k views

Vue: Modify data return depends userAgent

I'm new in VUE, I try to modify the disabled value depends the userAgent to show or hide the paymentMethod: data() { return { paymentMothods: [ { name: ...
2 votes
2 answers
2k views

User Agent is grayed out on Safari

I am trying to do an IE test using Safari but all of my options under user agent are grayed out. I'm running an Angular 5 project (ng serve) on Safari v 11.1
38 votes
10 answers
62k views

Is there an online user agent database? [closed]

How do you parse your user agent strings? I'm looking to get: Browser Browser Version OS OS Version from a user agent string. My app is written in perl and was previously using HTTP::BrowserDetect. ...
-1 votes
1 answer
214 views

change user agent in a loop in R

I am using this list of user agents: https://developers.whatismybrowser.com/useragents/explore/hardware_type_specific/computer/ and in the mean time I am webscraping multiple pages from amazon. I want ...
0 votes
1 answer
526 views

Is there a way to modify userAgent in Cypress to simulate mobile [2022] Chrome 100+

when google introduced Chrome 100 they disabled possibility to modify userAgent string from for example Cypress tests. We were using that technique to simulate that we are on mobile devices. For ...
60 votes
6 answers
67k views

Set useragent in WKWebview

How do I set a custom useragent string in a WKWebView? I'm trying to embed the version of my app so that my server-side can see what features are available. I found the following method: let ...
1 vote
1 answer
667 views

Incorrect user-agent displayed when using window.navigator - does not match http header

I switch user-agent using the chrome extention and here is the user-agent string in the http header: Here is a console log of the window.navigator.userAgent. why aren't they the same? How can I ...
0 votes
0 answers
281 views

yahooquery return key error and HTTP 404 Not Found

I am using the library yahooquery to extract a list of ticker for a specific sector. I works fine until 200 hits but if I increase it further it start failing. def screener(): global ticker_list ...
1 vote
0 answers
358 views

Detection of Windows 11 in Firefox (or any browser that doesn't support Client Hints)

I trying to detect Windows 11 using javascript without using this: navigator.userAgentData.getHighEntropyValues My reasons: Is not supported in many browsers It requires async programing which is ...
0 votes
1 answer
413 views

Compare two User Agents

We have a database which include thousands of user agents and their properties. I need to build an API on top of this database which receives a user agent, matches it with one of the existing user ...
0 votes
1 answer
88 views

How to detect if users browser is AVG via JavaScript?

How I can detect if the user is using AVG as a browser? If I go to Google and I type in what is my useragent, then AVG/100.xxx is mentioned, but when I use navigator.userAgent, the AVG part is not ...
1 vote
1 answer
2k views

file_get_contents returns 403 forbidden with user agent - PHP

I'm just trying to get the title from this product page, however it keeps showing a 403 forbidden error. Warning: file_get_contents(https://www.brownsfashion.com/uk/shopping/jem-18k-yellow-gold-...
1 vote
2 answers
2k views

Not possible to detect webview with Javascript and user agent on old android versions

I'm struggling on solving a really annoying issue for android. We are running our PWA inside of a webview - that's how websites can be ported to android apps. I'm trying to solve the issue with ...
0 votes
0 answers
415 views

How to detect safari browser in mvc 5 application

I have a mvc 5 application (not core but .net framework) where I am trying to add a check for Safari browser only but the issue is I am getting all browsers installed on my pc when i get User-Agent ...
0 votes
0 answers
100 views

How to whitelist User Agent for Shopware 5

For another service, which needs to download images from Shopware 5, I was asked to whitelist their header. But I can't find any hint how to do that in Shopware 5. They provided me this line: headers =...
2 votes
2 answers
4k views

UrlFetchApp.fetch() doesn't seem to change user agent

Trying to grab data from a website using Google Apps Script to put it directly into a spreadsheet. The fetch does not seem to be working, where the Python requests equivalent works just fine. Python ...
11 votes
1 answer
2k views

Illegal characters in path depending on User-Agent?

I have two identical calls to ASP.NET, the only difference is the User-Agent. I used Fiddler to reproduce the issue. The HTTP request line is: PUT http://localhost/API/es/us/havana/club/tickets/...
2 votes
0 answers
408 views

Are there way to replace User-Agent in ionic?

The plugin that was originally used seemed to be disabled in ionic 6. If anyone knows how to do it, please let me know. https://ionicframework.jp/docs/native/user-agent/
0 votes
1 answer
4k views

How can I specify a particular user-agent string in a command-line invocation of Firefox?

I would like to make a bash script that will iterate over different user agent options, open Firefox with the selected user agent, wait for x seconds, and then close, and loop. Is there a command-...
4 votes
2 answers
560 views

Firebase Hosting returning 500 internal error for Googlebot user-agent when using Google Chrome's "network conditions" tab?

I've got the following set up on my Firebase web app (it's a Single Page App built with React): I'm doing SSR for robots user agents, so they get full rendered HTML and no Javascript Users get the ...
0 votes
1 answer
564 views

Can two devices of the exact same make and model be detected as different using the user-agent string, or anything similar?

The Scenario I have a situation of coding where many people will be using the same devices. Each person will have a Mac for example of the same model, and same OS.... but I still need to be able to ...
0 votes
1 answer
1k views

Share USER_AGENT between scrapy_fake_useragent and cfscrape scrapy extension

I'm trying to create a scraper for cloudfare protected website using cfscrape, privoxy and tor, and scrapy_fake_useragent I'm using cfscrape python extension to bypass cloudfare protection with ...
5 votes
3 answers
4k views

Chrome extension API for intercepting/modifying websockets UA

I'm trying to write an extension that will modify the User-Agent on all outgoing requests from Chrome. For http://, https://, ftp://, file://, or chrome-extension:// I can use the chrome.webRequest ...
7 votes
2 answers
5k views

Changing user-agent on puppeteer-extra doesn't seem to take affect

I'm trying to scrape different websites using puppeteer. As I'm using puppeteer-extra for that (for their stealth-plugin), I've decided to use their anonymize-ua plugin to randomly change the default ...
6 votes
3 answers
4k views

Is it possible to detect the Android captive portal browser?

I have a captive portal which, as of Android 5.0+ Lollipop, launches in Android's Captive Portal Browser rather than the device's default browser. I need to somehow detect if they are in the captive ...
1 vote
0 answers
317 views

Why does OpenStreetMap give a 403 error through Python's urllib.request.urlretrieve, but works perfectly when using Requests?

I'm trying to grab tiles from OpenStreetMap. I learned the syntax of their API. I have an "old way" of doing things, using Requests, and a "new way", which is being used by someone ...
3 votes
1 answer
895 views

Cypress cy.origin is doesn't work when it link to LinkedIn

I was developing a feature that redirects users to profiles on various platforms. And to test this, I wrote the following code using the newly released cy.origin yesterday. cy.origin('www.example.com',...
3 votes
2 answers
2k views

How can I download a file in Python3 with urlopen() or add custom headers to urlretrieve()?

tl;dr I want do download a file from a server who only allows certain User-Agents. I managed to get a 200 OK from the site by using following code: opener = urllib.request.build_opener() opener....
0 votes
0 answers
105 views

Apache failed to redirect user agent to Rendertron

I deploy a single page application in apache and looking for using rendertron to render a static page for the user agent, but seems the apache failed to redirect the user agent to the specific ...
1 vote
1 answer
2k views

I want to execute a function if the userAgent is GoogleBot

I am trying to execute some code if it's a crawler. Specifically Googlebot. This is how I am doing it but I feel there is a cleaner way. I saw some posts which contained regex solutions but the ...
0 votes
1 answer
662 views

Is "User-Agent" header mandatory in https GET request as per RFC

I was trying to download a file from a server using mbedtls. used the following GET request GET /xxxxxxxxxxxxxxx.xml HTTP/1.1 Host: example_xxxxx.com Connection: keep-alive The server responded with ...
2 votes
0 answers
218 views

Change userAgent in Flutter Web

I am trying to change userAgent for my Flutter Web app as it adapts to different phone sizes but not desktop. To tackle this problem, I want to change the userAgent on desktop devices to show a phone/...

1
3 4
5
6 7
48