目前,我正在使用以下代码对网站进行分析:
import json
from os.path import join, dirname
from watson_developer_cloud import AlchemyLanguageV1
alchemy_language = AlchemyLanguageV1(api_key='YOUR API KEY')
url = 'https://developer.ibm.com/watson/blog/2015/11/03/price-reduction-
for-watson-personality-insights/'
combined_operations = ['page-image', 'entity', 'keyword', 'title',
'author', 'taxonomy', 'concept', 'doc-emotion']
print(json.dumps(alchemy_language.combined(url=url,
extract=combined_operations), indent=2))
谁能告诉我如何引用我拥有自己的 html 文件进行分析的本地目录?我尝试使用以下代码,但它不起作用:
#html ='C:\Users\Downloads\Python\name8.htm'