为什么我的ScopusAPI搜索结果与使用python的elsevier搜索引擎结果不匹配?

kokeuurv  于 2021-06-13  发布在  ElasticSearch
关注(0)|答案(0)|浏览(326)

我面临一个问题,我的网页刮工具。
我在python中做了一个函数,使用scopus搜索api在elsevierveportal上获取文章的详细信息。但是,在我运行程序后,它给我的结果集与elsevierportal不同。
爱思唯尔门户-https://www.elsevier.com/ scopus api-https://api.elsevier.com/content/search/scopus?query=all(gene)&apikey=7f59af901d2d86f78a 1fd60c1bf9426a
代码:
url='https://api.elsevier.com/content/search/scopus?query=“+query+”&apikey=“+scp\u api”


# response object

response = requests.get(url, headers=headers, timeout=30)
soup = BeautifulSoup(response.content, 'lxml')

# convert resonse into josn

obj = json.loads(soup.text)

######## Find required attributes in the response object

for item in obj['search-results']['entry']:
    try:
        if "prism:Issn" and "prism:issn" not in obj:
            issn = item['prism:eIssn']
        else:
            issn = item['prism:issn']

        resp_obj = {"entities": {"Search Engine": "Elsevier SCOPUS Search Engine",
                                 "items": [
                                     {"DOI": item['prism:doi'],
                                      "Title": item['dc:title'],
                                      "URLs": item['prism:url'],
                                      "Authors": item['dc:creator'],
                                      "Publication Name": item['prism:publicationName'],
                                      "ISSN": issn,
                                      "Cited count": item['citedby-count'],
                                      "Affiliation": item['affiliation'][0]['affilname'],
                                      "Type": item['subtypeDescription'],
                                      "Published date": item['prism:coverDate'],
                                      "Abstract": item['prism:publicationName']
                                      }
                                 ]}}
        # append dict object data
        data.append(resp_obj)
    except Exception as e:  # raise e
        pass
        # print('error scopus:', e)

任何理由或帮助将不胜感激。
谢谢。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题