Skip to content

Instantly share code, notes, and snippets.

@rehmatworks
Created September 10, 2021 15:35
Show Gist options
  • Select an option

  • Save rehmatworks/565d9847cd5ad1cc6990f55b487e3c33 to your computer and use it in GitHub Desktop.

Select an option

Save rehmatworks/565d9847cd5ad1cc6990f55b487e3c33 to your computer and use it in GitHub Desktop.

Revisions

  1. rehmatworks created this gist Sep 10, 2021.
    12 changes: 12 additions & 0 deletions dnb.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    import requests

    headers = {
    'sec-ch-ua': '"Google Chrome";v="93", " Not;A Brand";v="99", "Chromium";v="93"',
    'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36',
    'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
    }

    response = requests.get('https://www.dnb.com/business-directory/company-profiles.pfizer_inc.140f48fa0b37556f925afcaec7b5c566.html', headers=headers)


    print(response)