首页 > 应用开发 > IT综合 > nutch2.1抓取中文网站
A、调整mysql配置,避免存入mysql的中文出现乱码。修改 ${APACHE_NUTCH_HOME} /runtime/local/conf/gora.properties
###############################
# MySQL properties #
###############################
gora.sqlstore.jdbc.driver=com.mysql.jdbc.Driver
gora.sqlstore.jdbc.url=jdbc:mysql://10.10.11.252:3306/nutch? useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull
gora.sqlstore.jdbc.user=devuser
gora.sqlstore.jdbc.password=devuser
B、修改 ${APACHE_NUTCH_HOME} /runtime/local/conf/nutch-site.xml文件
This allows selecting non-English language as default one to retrieve.
It is a useful setting for search engines build for certain national group.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29653106/viewspace-1163552/ ,如需转载,请注明出处,否则将追究法律责任。