Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7938937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:56:49+00:00 2026-06-03T22:56:49+00:00

I am working on a website scraping project using Selenium in Python. When I

  • 0

I am working on a website scraping project using Selenium in Python. When I open the homepage through a browser, it opens properly.

But, when I try to open the webpage through webdriver() in Selenium, it opens a completely different page.

I think, it is able to detect the user-agent( not sure what it is called) and is able to check the properties of the browser or something.

Is it possible to pass the properties though the webdriver() so that the right homepage is loaded.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T22:56:51+00:00Added an answer on June 3, 2026 at 10:56 pm

    Changing the user agent in the python version of webdriver is done by altering your browser’s profile. I have only done this for webdriver.Firefox() by passing a profile parameter. You need to do the following:

    from selenium import webdriver
    profile = webdriver.FirefoxProfile()
    profile.set_preference("general.useragent.override","your_user_agent_string")
    driver=webdriver.Firefox(profile)
    

    Every time you wish to change the user agent you will need to restart your web browser (i.e. call driver=webdriver.Firefox(profile) again)

    If you are unsure to what your user agent string is do a search for “what is my user agent” on a browser that displays the page properly and just copy and paste that one.

    Hope that sorts it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My website is working fine on IE, but when I open it on Firefox,
hey i guys i want help from you. i am working on website project,
Working on a website that has Employee and Branch entities, using a database table
I'm working on a website that will be using Facebook Connect to authenticate users.
I'm trying to add a payment method to working website that is using a
I am working on website using ajax and C#. I started learning these languages
I am creating a website using Python and the Bottle framework for the first
I am working on a website, where I am using Java/Java EE/struts. When I
Im working on a website built using .net which I've never worked with before.
My website working perfect on local, but not in host. I wrote my queries

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.