mirror of
https://github.com/Giu-zhao/ios_rule_script
synced 2024-11-22 08:28:25 +08:00
修复知乎首页视频无法正常播放的问题 close #383
This commit is contained in:
parent
1800f91853
commit
2af634ec88
@ -184,7 +184,7 @@ let magicJS = MagicJS(scriptName, "INFO");
|
||||
// 修正由于JS number类型精度问题,导致JSON.parse精度丢失,引起视频无法自动播放的问题
|
||||
try {
|
||||
if (element.hasOwnProperty("extra") && element["extra"].hasOwnProperty("type") && element["extra"]["type"] === "zvideo") {
|
||||
let video_id = element["common_card"]["feed_content"]["video"]["customized_page_url"].match(/https?:\/\/www\.zhihu\.com\/[^?]*\?(videoID|content_id)=(\d*)/)[1];
|
||||
let video_id = element["common_card"]["feed_content"]["video"]["customized_page_url"].match(/https?:\/\/www\.zhihu\.com\/[^=]*=(\d*)/)[1];
|
||||
element["common_card"]["feed_content"]["video"]["id"] = video_id;
|
||||
}
|
||||
} catch (err) {
|
||||
|
Loading…
Reference in New Issue
Block a user