Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1854

https get request with python urllib2 [closed]

$
0
0

I am trying to fetch data from quandl using urllib2.Please check code below.

import jsonfrom pymongo import MongoClientimport urllib2import requestsimport ssl#import quandlcodes = [100526];for id in codes:    url = 'https://www.quandl.com.com//api/v3/datasets/AMFI/"+str(id)+".json?api_key=XXXXXXXX&start_date=2013-08-30'    req = urllib2.Request(url)    response = urllib2.urlopen(req)    data = response.read()    print data

OR

for id in codes:    url = "https://www.quandl.com.com//api/v3/datasets/AMFI/"+str(id)+".json?api_key=XXXXXXXX&start_date=2013-08-30"    request = requests.get(url,verify=False)    print request

I am getting HTTPERROR exception 404 in 1st case. and when I use request module I get SSL error even after using verify=false. I am looking through previous posts but most of them are related to HTTP request.


Viewing all articles
Browse latest Browse all 1854

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>