diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..4f49d9c --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,29 @@ +name: Build and Release + + on: + push: + tags: + - 'v*.*.*' # 仅在推送标签时触发 + + jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: '11' + + - name: Build with Maven + run: mvn clean package + + - name: Create Release + uses: softprops/action-gh-release@v1 + with: + files: target/*.jar + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/src/main/java/org/codelibs/fess/crawler/client/http/PlaywrightClient.java b/src/main/java/org/codelibs/fess/crawler/client/http/PlaywrightClient.java index 6c7ebf4..6bbcba0 100644 --- a/src/main/java/org/codelibs/fess/crawler/client/http/PlaywrightClient.java +++ b/src/main/java/org/codelibs/fess/crawler/client/http/PlaywrightClient.java @@ -67,6 +67,7 @@ import com.microsoft.playwright.Response; import com.microsoft.playwright.options.Cookie; import com.microsoft.playwright.options.LoadState; +import com.microsoft.playwright.options.WaitUntilState; import com.microsoft.playwright.options.Proxy; import jakarta.annotation.Resource; @@ -287,9 +288,11 @@ public ResponseData execute(final RequestData request) { if (logger.isDebugEnabled()) { logger.debug("Accessing {}", url); } - final Response response = page.navigate(url); - - page.waitForLoadState(renderedState); + + final Response response = page.navigate(url, + new Page.NavigateOptions().setWaitUntil(WaitUntilState.NETWORKIDLE).setTimeout(60000)); + + page.waitForLoadState(renderedState, new Page.WaitForLoadStateOptions().setTimeout(60000)); if (contentWaitDuration > 0L) { logger.debug("Waiting {} ms before downloading the content.", contentWaitDuration);