mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-09 16:38:50 +00:00
[AnimeUltimeBridge] fix: convert strings from iso-8859-1 to utf8 (#2552)
This fixes a bug with json_encode() being unable to produce output because it expects utf8 strings.
This commit is contained in:
parent
cd174c7e22
commit
060b4c7d58
@ -37,9 +37,11 @@ class AnimeUltimeBridge extends BridgeAbstract {
|
|||||||
$processedOK = 0;
|
$processedOK = 0;
|
||||||
foreach (array($thismonth, $lastmonth) as $requestFilter) {
|
foreach (array($thismonth, $lastmonth) as $requestFilter) {
|
||||||
|
|
||||||
//Retrive page contents
|
|
||||||
$url = self::URI . 'history-0-1/' . $requestFilter;
|
$url = self::URI . 'history-0-1/' . $requestFilter;
|
||||||
$html = getSimpleHTMLDOM($url);
|
$html = getContents($url);
|
||||||
|
// Convert html from iso-8859-1 => utf8
|
||||||
|
$html = utf8_encode($html);
|
||||||
|
$html = str_get_html($html);
|
||||||
|
|
||||||
//Relases are sorted by day : process each day individually
|
//Relases are sorted by day : process each day individually
|
||||||
foreach($html->find('div.history', 0)->find('h3') as $daySection) {
|
foreach($html->find('div.history', 0)->find('h3') as $daySection) {
|
||||||
@ -87,6 +89,8 @@ class AnimeUltimeBridge extends BridgeAbstract {
|
|||||||
|
|
||||||
// Retrieve description from description page
|
// Retrieve description from description page
|
||||||
$html_item = getContents($item_uri);
|
$html_item = getContents($item_uri);
|
||||||
|
// Convert html from iso-8859-1 => utf8
|
||||||
|
$html_item = utf8_encode($html_item);
|
||||||
$item_description = substr(
|
$item_description = substr(
|
||||||
$html_item,
|
$html_item,
|
||||||
strpos($html_item, 'class="principal_contain" align="center">') + 41
|
strpos($html_item, 'class="principal_contain" align="center">') + 41
|
||||||
|
Loading…
Reference in New Issue
Block a user