refactor: inline single-use haswatchordertable

This commit is contained in:
2026-06-23 17:16:51 +02:00
committed by Milas Holsting
parent 648eb568ff
commit 3b53bde103

View File

@@ -169,10 +169,6 @@ func extractRows(doc *goquery.Document) []watchOrderRow {
return rows
}
func hasWatchOrderTable(doc *goquery.Document) bool {
return doc.Find("#wo_list").Length() > 0
}
// shouldTryProxy returns true for transient errors where the Jina proxy may help
// (e.g. Cloudflare blocking, rate limits)
func shouldTryProxy(err error) bool {
@@ -358,7 +354,7 @@ func FetchWatchOrder(ctx context.Context, httpClient *http.Client, url string) (
}
// empty table indicates JS-rendered content; need proxy
if !hasWatchOrderTable(doc) {
if doc.Find("#wo_list").Length() == 0 {
return fetchViaProxy(ctx, httpClient, url, rootID)
}