0

I am trying to download this url which is a frame on this page.

I have tried like this:

import urllib.request
url = 'https://tips.danskespil.dk/tips13/?#/tps/poolid/2954'
response = urllib.request.urlopen(url)
html = response.read()

and also this way:

import requests
page = requests.get(url)

but both ways give me the error: SSL: CERTIFICATE_VERIFY_FAILED request.get

Any help would be much appriciated.

Tom de Geus
  • 5,625
  • 2
  • 33
  • 77
somedude
  • 3
  • 4

1 Answers1

1

If you're not worried about safety (which you should be) your best bet is to use verify=False in the request function.

page = requests.get(url, verify=False)

You can also set verify to a directory of certificates with trusted CAs like so

verify = '/path/to/certfile'

You can refer to the documentation here for all the ways to get around it

Harsh Vedant
  • 107
  • 1
  • 7