Тема: парсинг JSON Google Customsearch API
Ось таке завдання: потрібно зробити пошук в гугл програмно на Python.
Так як в пітоні я чайник, потрібна допомога:
▼Прихований текст
import pprint
import json
from googleapiclient.discovery import build
def main():
  service = build("customsearch", "v1",
            developerKey = "<myDeveloperKey>")
  #json.loads = service.cse().list(
  res = service.cse().list(
      q = '3d.justaction.xyz',
      cx = '017576662512468239146:omuauf_lfve',
      num = 1,
      googlehost = 'www.google.com.ua',
    ).execute()
  #pprint.pprint(json.loads)
  pprint.pprint(res)
if __name__ == '__main__':
    main()В результаті res, якщо я правильно розумію, є асоціативним масивом. 
Сам результат: 
▼Прихований текст
{'context': {'facets': [[{'anchor': 'Lectures',
                          'label': 'lectures',
                          'label_with_op': 'more:lectures'}],
                        [{'anchor': 'Assignments',
                          'label': 'assignments',
                          'label_with_op': 'more:assignments'}],
                        [{'anchor': 'Reference',
                          'label': 'reference',
                          'label_with_op': 'more:reference'}]],
             'title': 'CS Curriculum'},
 'items': [{'cacheId': '81VWSGPSXVUJ',
            'displayLink': 'www.cs.jhu.edu',
            'fileFormat': 'PDF/Adobe Acrobat',
            'formattedUrl': 'www.cs.jhu.edu/.../Advances%20in%20Image- '
                            'Guided%20Surgery%20AAMI.pdf',
            'htmlFormattedUrl': 'www.cs.jhu.edu/.../Advances%20in%20Image- '
                                'Guided%20Surgery%20AAMI.pdf',
            'htmlSnippet': '38 y.o. woman 23 weeks <b>gestation</b> with '
                           'history of breast cancer. A small .... '
                           '<b>3D</b>-<br>\n'
                           'Slicer adapted for prostate procedures and ... MR '
                           'guided biopsy-<b>3D</b> slicer.',
            'htmlTitle': 'Dr. Corrino's Talk',
            'kind': 'customsearch#result',
            'link': 'http://www.cs.jhu.edu/cista/445/Lectures/Advances%20in%20Image-Guided%20Surgery%20AAMI.pdf',
            'mime': 'application/pdf',
            'pagemap': {'metatags': [{'author': 'Russell Taylor',
                                      'creationdate': "D:20071116170941-05'00'",
                                      'creator': 'PowerPoint',
                                      'moddate': "D:20071116170941-05'00'",
                                      'producer': 'Mac OS X 10.4.10 Quartz '
                                                  'PDFContext',
                                      'title': 'Advances in Image-Guided '
                                               'Surgery AAMI.ppt'}]},
            'snippet': '38 y.o. woman 23 weeks gestation with history of '
                       'breast cancer. A small .... 3D-\n'
                       'Slicer adapted for prostate procedures and ... MR '
                       'guided biopsy-3D slicer.',
            'title': "Dr. Corrino's Talk"}],
 'kind': 'customsearch#search',
 'queries': {'nextPage': [{'count': 1,
                           'cx': '017576662512468239146:omuauf_lfve',
                           'googleHost': 'www.google.com.ua',
                           'inputEncoding': 'utf8',
                           'outputEncoding': 'utf8',
                           'safe': 'off',
                           'searchTerms': '3d.justaction.xyz',
                           'startIndex': 2,
                           'title': 'Google Custom Search - 3d.justaction.xyz',
                           'totalResults': '197000'}],
             'request': [{'count': 1,
                          'cx': '017576662512468239146:omuauf_lfve',
                          'googleHost': 'www.google.com.ua',
                          'inputEncoding': 'utf8',
                          'outputEncoding': 'utf8',
                          'safe': 'off',
                          'searchTerms': '3d.justaction.xyz',
                          'startIndex': 1,
                          'title': 'Google Custom Search - 3d.justaction.xyz',
                          'totalResults': '197000'}]},
 'searchInformation': {'formattedSearchTime': '0.17',
                       'formattedTotalResults': '197,000',
                       'searchTime': 0.166133,
                       'totalResults': '197000'},
 'url': {'template': 'https://www.googleapis.com/customsearch/v1?q={searchTerms}&num={count?}&start={startIndex?}&lr={language?}&safe={safe?}&cx={cx?}&cref={cref?}&sort={sort?}&filter={filter?}&gl={gl?}&cr={cr?}&googlehost={googleHost?}&c2coff={disableCnTwTranslation?}&hq={hq?}&hl={hl?}&siteSearch={siteSearch?}&siteSearchFilter={siteSearchFilter?}&exactTerms={exactTerms?}&excludeTerms={excludeTerms?}&linkSite={linkSite?}&orTerms={orTerms?}&relatedSite={relatedSite?}&dateRestrict={dateRestrict?}&lowRange={lowRange?}&highRange={highRange?}&searchType={searchType}&fileType={fileType?}&rights={rights?}&imgSize={imgSize?}&imgType={imgType?}&imgColorType={imgColorType?}&imgDominantColor={imgDominantColor?}&alt=json',
         'type': 'application/json'}}Ось, мені потрібно звідси витягнути деякі дані.Наприклад, якщо прописати pprint.pprint(res['items']) - виведе тільки те що знаходиться в items, мені ж потрібно отримати доступ до конкретного рядка, наприклад items.htmlSnippet. 
Хтось підкаже як це зробити?
