403 Forbidden with Java but not web browser?

前端 未结 4 1885
陌清茗
陌清茗 2020-11-22 03:08

I am writing a small Java program to get the amount of results for a given Google search term. For some reason, in Java I am getting a 403 Forbidden but I am getting the rig

4条回答
  •  情深已故
    2020-11-22 03:28

    It's because the site uses SSL. Try using the Jersey HTTP Client. You will probably also have to learn a little about HTTPS and the certificates, but I think Jersey can bet set to ignore most of the details relating to the actual security.

提交回复
热议问题