Project- Exploring Web Scraping: Python Adventures on Wikipedia and Amazon

3 / 11

Scraping Wikipedia Page - Adding browser agent string

In this step we will set the browser agent string. A browser agent string helps identify which browser is being used, what version, and on which operating system.

You can get your browser agent string from here:

https://udger.com/resources/online-parser

We need a browser agent here so that when a request is sent to a web page, it "thinks" that the request came from a browser and not a Python program. So the web page returns the same information to our program that it would return to a web browser.

INSTRUCTIONS
  • Set the browser agent string in the user_agent variable:

    <<your code goes here>> = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36'
    
See Answer

No hints are availble for this assesment


Note - Having trouble with the assessment engine? Follow the steps listed here

Loading comments...