forked from yasserg/crawler4j
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
78 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 31 additions & 12 deletions
43
...mmons/src/main/java/edu/uci/ics/crawler4j/crawler/authentication/CredentialsProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,31 @@ | ||
package edu.uci.ics.crawler4j.crawler.authentication; | ||
|
||
import java.util.Map; | ||
|
||
import org.apache.hc.client5.http.auth.AuthScope; | ||
import org.apache.hc.client5.http.auth.Credentials; | ||
|
||
public interface CredentialsProvider { | ||
|
||
void addCredentials(Map<AuthScope, Credentials> credentialsMap); | ||
|
||
} | ||
/*- | ||
* #%L | ||
* de.hs-heilbronn.mi:crawler4j-commons | ||
* %% | ||
* Copyright (C) 2010 - 2022 crawler4j-fork (pre-fork: Yasser Ganjisaffar) | ||
* %% | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* #L% | ||
*/ | ||
package edu.uci.ics.crawler4j.crawler.authentication; | ||
|
||
import java.util.Map; | ||
|
||
import org.apache.hc.client5.http.auth.AuthScope; | ||
import org.apache.hc.client5.http.auth.Credentials; | ||
|
||
public interface CredentialsProvider { | ||
|
||
void addCredentials(Map<AuthScope, Credentials> credentialsMap); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 33 additions & 14 deletions
47
...ore/src/main/java/edu/uci/ics/crawler4j/parser/css/ThrowingCSSParseExceptionCallback.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,33 @@ | ||
package edu.uci.ics.crawler4j.parser.css; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
import com.helger.css.handler.ICSSParseExceptionCallback; | ||
import com.helger.css.parser.ParseException; | ||
|
||
public class ThrowingCSSParseExceptionCallback implements ICSSParseExceptionCallback { | ||
|
||
@Override | ||
public void onException (@Nonnull final ParseException ex) { | ||
throw new RuntimeException(ex); | ||
} | ||
} | ||
/*- | ||
* #%L | ||
* de.hs-heilbronn.mi:crawler4j-core | ||
* %% | ||
* Copyright (C) 2010 - 2022 crawler4j-fork (pre-fork: Yasser Ganjisaffar) | ||
* %% | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* #L% | ||
*/ | ||
package edu.uci.ics.crawler4j.parser.css; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
import com.helger.css.handler.ICSSParseExceptionCallback; | ||
import com.helger.css.parser.ParseException; | ||
|
||
public class ThrowingCSSParseExceptionCallback implements ICSSParseExceptionCallback { | ||
|
||
@Override | ||
public void onException (@Nonnull final ParseException ex) { | ||
throw new RuntimeException(ex); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters