Java 如何解决使用Boilerpipe时的ConnectException错误?

Java 如何解决使用Boilerpipe时的ConnectException错误?,java,exception,connection,connectexception,boilerpipe,Java,Exception,Connection,Connectexception,Boilerpipe,我想使用Boilerpipe从多个网站的新闻页面中提取文本,问题是每次尝试时,都会出现ConnectionException错误。 我刚刚使用了以下示例语法: 以下是连接错误: de.l3s.boilerpipe.BoilerpipeProcessingException: java.net.ConnectException: Connection refused: connect at de.l3s.boilerpipe.extractors.ExtractorBase.getText(

我想使用Boilerpipe从多个网站的新闻页面中提取文本,问题是每次尝试时,都会出现ConnectionException错误。 我刚刚使用了以下示例语法:

以下是连接错误:

de.l3s.boilerpipe.BoilerpipeProcessingException: java.net.ConnectException: Connection refused: connect
   at de.l3s.boilerpipe.extractors.ExtractorBase.getText(ExtractorBase.java:89)
   at extract.Test.main(Test.java:14)
Caused by: java.net.ConnectException: Connection refused: connect
我尝试了很多网站,但都出现了同样的错误


我如何解决这个问题,或者至少看看问题在哪里?可能是防火墙或端口配置…

经过进一步研究,我发现是企业中的防火墙阻止了这些请求

de.l3s.boilerpipe.BoilerpipeProcessingException: java.net.ConnectException: Connection refused: connect
   at de.l3s.boilerpipe.extractors.ExtractorBase.getText(ExtractorBase.java:89)
   at extract.Test.main(Test.java:14)
Caused by: java.net.ConnectException: Connection refused: connect