소스 검색

Fix curlopt options for HTML+XPath (#4759)

Improvement of https://github.com/FreshRSS/FreshRSS/pull/4220
Alexandre Alapetite 3 년 전
부모
커밋
e96b6266b5
1개의 변경된 파일3개의 추가작업 그리고 4개의 파일을 삭제
  1. 3 4
      app/Models/Feed.php

+ 3 - 4
app/Models/Feed.php

@@ -589,10 +589,9 @@ class FreshRSS_Feed extends Minz_Model {
 	}
 	}
 
 
 	/**
 	/**
-	 * @param array<string,mixed> $attributes
 	 * @return SimplePie|null
 	 * @return SimplePie|null
 	 */
 	 */
-	public function loadHtmlXpath(bool $loadDetails = false, bool $noCache = false, array $attributes = []) {
+	public function loadHtmlXpath(bool $loadDetails = false, bool $noCache = false) {
 		if ($this->url == '') {
 		if ($this->url == '') {
 			return null;
 			return null;
 		}
 		}
@@ -620,8 +619,8 @@ class FreshRSS_Feed extends Minz_Model {
 			return null;
 			return null;
 		}
 		}
 
 
-		$cachePath = FreshRSS_Feed::cacheFilename($feedSourceUrl, $attributes, FreshRSS_Feed::KIND_HTML_XPATH);
-		$html = httpGet($feedSourceUrl, $cachePath, 'html', $attributes);
+		$cachePath = FreshRSS_Feed::cacheFilename($feedSourceUrl, $this->attributes(), FreshRSS_Feed::KIND_HTML_XPATH);
+		$html = httpGet($feedSourceUrl, $cachePath, 'html', $this->attributes());
 		if (strlen($html) <= 0) {
 		if (strlen($html) <= 0) {
 			return null;
 			return null;
 		}
 		}