Class CloudflareScraper


  • public class CloudflareScraper
    extends java.lang.Object
    • Constructor Detail

      • CloudflareScraper

        public CloudflareScraper​(java.net.URI uri)
      • CloudflareScraper

        public CloudflareScraper​(java.net.URI uri,
                                 int challengeDelay)
      • CloudflareScraper

        public CloudflareScraper​(java.net.URI uri,
                                 int challengeDelay,
                                 int connectionTimeout)
      • CloudflareScraper

        public CloudflareScraper​(java.net.URI uri,
                                 int challengeDelay,
                                 int connectionTimeout,
                                 int readTimeout)
    • Method Detail

      • getAnswer

        public java.lang.String getAnswer()
                                   throws javax.script.ScriptException
        Throws:
        javax.script.ScriptException
      • getCookie

        public java.lang.String getCookie()
                                   throws java.io.IOException,
                                          java.net.URISyntaxException,
                                          java.lang.InterruptedException
        Throws:
        java.io.IOException
        java.net.URISyntaxException
        java.lang.InterruptedException
      • getCookies

        public java.util.List<java.lang.String> getCookies()
                                                    throws java.lang.InterruptedException,
                                                           java.io.IOException,
                                                           java.net.URISyntaxException
        Throws:
        java.lang.InterruptedException
        java.io.IOException
        java.net.URISyntaxException
      • buildRequest

        public java.net.HttpURLConnection buildRequest​(java.net.URI url)
                                                throws java.io.IOException
        Throws:
        java.io.IOException
      • isCloudflareProtected

        public boolean isCloudflareProtected()
      • getContent

        public java.lang.String getContent​(java.io.InputStream inputStream)
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • getDomainName

        public java.lang.String getDomainName​(java.net.URI uri)
      • getUri

        public java.net.URI getUri()
      • getConnectionTimeout

        public int getConnectionTimeout()
      • getReadTimeout

        public int getReadTimeout()
      • getResponseCode

        public int getResponseCode()
      • getContent

        public java.lang.String getContent()
      • getRayId

        public java.lang.String getRayId()
      • getChallenge

        public java.lang.String getChallenge()
      • getChallengeVc

        public java.lang.String getChallengeVc()
      • getChallengePass

        public java.lang.String getChallengePass()
      • getChallengeAnswer

        public java.lang.String getChallengeAnswer()