key = boto.connect_s3().get_bucket('commoncrawl').get_key( 'crawl-data/CC-NEWS/2018/04/CC-NEWS-20180405091124-00174.warc.gz')
with smart_open.smart_open(key) as fin: for record in fin: if record['Warc-type'] == 'warcinfo': pass else: print(record['warc-target-uri'])