Last active
August 29, 2015 14:01
-
-
Save IuryAlves/e21ac43cebac62e7b2e0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding: utf-8 | |
import json | |
with open('urls.json', 'r') as urls: | |
dic = json.load(urls, encoding='utf-8') | |
for item in dic['responseData']: | |
sub_item = dic['responseData']['results'] | |
for s in sub_item: | |
for key in s: | |
if key == u'url': | |
print s[key] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"responseData": {"results":[{"GsearchResultClass":"GwebSearch","unescapedUrl":"http://pt.wikipedia.org/wiki/Python","url":"http://pt.wikipedia.org/wiki/Python","visibleUrl":"pt.wikipedia.org","cacheUrl":"http://www.google.com/search?q\u003dcache:Q7EduHu5LE4J:pt.wikipedia.org","title":"\u003cb\u003ePython\u003c/b\u003e – Wikipédia, a enciclopédia livre","titleNoFormatting":"Python – Wikipédia, a enciclopédia livre","content":"\u003cb\u003ePython\u003c/b\u003e é uma \u003cb\u003elinguagem\u003c/b\u003e de programação de alto nível , interpretada, imperativa, \norientada a objetos, funcional, de tipagem dinâmica e forte. Foi lançada por ..."},{"GsearchResultClass":"GwebSearch","unescapedUrl":"http://www.python.org.br/wiki/AprendaProgramar","url":"http://www.python.org.br/wiki/AprendaProgramar","visibleUrl":"www.python.org.br","cacheUrl":"http://www.google.com/search?q\u003dcache:ZWQY-SYiOIoJ:www.python.org.br","title":"AprendaProgramar - \u003cb\u003ePython\u003c/b\u003e","titleNoFormatting":"AprendaProgramar - Python","content":"Para acompanhar esse tutorial você precisará de um computador qualquer onde \ntenha instalado um interpretador da \u003cb\u003elinguagem Python\u003c/b\u003e. Em quase todas as ..."},{"GsearchResultClass":"GwebSearch","unescapedUrl":"http://www.python.org.br/","url":"http://www.python.org.br/","visibleUrl":"www.python.org.br","cacheUrl":"http://www.google.com/search?q\u003dcache:-eMNPZLBZeUJ:www.python.org.br","title":"\u003cb\u003ePython\u003c/b\u003e","titleNoFormatting":"Python","content":"A comunidade \u003cb\u003ePython\u003c/b\u003e Brasil reune grupos de usuários em todo o Brasil \ninteressados em difundir e divulgar a \u003cb\u003elinguagem\u003c/b\u003e de programação \u003cb\u003ePython\u003c/b\u003e, \nabrigando ..."},{"GsearchResultClass":"GwebSearch","unescapedUrl":"http://pyscience-brasil.wikidot.com/python:python-oq-e-pq","url":"http://pyscience-brasil.wikidot.com/python:python-oq-e-pq","visibleUrl":"pyscience-brasil.wikidot.com","cacheUrl":"http://www.google.com/search?q\u003dcache:WYW97YZWYRwJ:pyscience-brasil.wikidot.com","title":"\u003cb\u003ePython\u003c/b\u003e: O que é? Por que usar? - PyScience-Brasil","titleNoFormatting":"Python: O que é? Por que usar? - PyScience-Brasil","content":"12 set. 2008 \u003cb\u003e...\u003c/b\u003e \u003cb\u003ePython\u003c/b\u003e é uma \u003cb\u003elinguagem\u003c/b\u003e de programação criada por Guido van Rossum em \n1991. Os objetivos do projeto da \u003cb\u003elinguagem\u003c/b\u003e eram: produtividade ..."}],"cursor":{"resultCount":"47.800","pages":[{"start":"0","label":1},{"start":"4","label":2},{"start":"8","label":3},{"start":"12","label":4},{"start":"16","label":5},{"start":"20","label":6},{"start":"24","label":7},{"start":"28","label":8}],"estimatedResultCount":"47800","currentPageIndex":0,"moreResultsUrl":"http://www.google.com/search?oe\u003dutf8\u0026ie\u003dutf8\u0026source\u003duds\u0026start\u003d0\u0026hl\u003dpt-BR\u0026q\u003dpython+linguagem","searchResultTime":"0,24"}}, "responseDetails": null, "responseStatus": 200} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Muito Obrigado!