Code Monkey home page Code Monkey logo

Comments (6)

VirgilClyne avatar VirgilClyne commented on August 23, 2024

无法复现啊🤔 我这边是直接跳转到

https://zh.wikipedia.org/wiki/影响因子

具体的系统设置有什么特别的地方吗?比如地区语言?

from iringo.

Meonthb avatar Meonthb commented on August 23, 2024

无法复现啊🤔 我这边是直接跳转到

https://zh.wikipedia.org/wiki/影响因子

具体的系统设置有什么特别的地方吗?比如地区语言?

语言、地区设置如图:

from iringo.

VirgilClyne avatar VirgilClyne commented on August 23, 2024

无法复现啊🤔 我这边是直接跳转到

https://zh.wikipedia.org/wiki/影响因子

具体的系统设置有什么特别的地方吗?比如地区语言?

语言、地区设置如图:

已复现,地区英国,语言简体中文时维基百科链接跳转的域名是en.wikipedia.org
Siri搜索返回的结果内容有问题,无法解决🤪

from iringo.

Asstiff avatar Asstiff commented on August 23, 2024

也许可以判断 en.wikipedia.org/wiki/ 后的关键字语言,若包含中文,就把前面改写成 zh.wikipedia.org/wiki/

(这个确实蛮难受的。有空的话希望可以研究一下吧)

from iringo.

Asstiff avatar Asstiff commented on August 23, 2024

@Meonthb
我没什么正则经验,简单做了一个,可以临时解决一下这个问题。
基本上就是检测到 wiki/ 后有百分号就改用 zh.wikipedia.org。
(这种方法除了中文,各种特殊字符也会中枪。但简单做的,将就用吧。 )
(edit:简单改了一下,改成判断首字是不是百分号了,这样误跳转几率小一些 - 测试了 200 个 random articles,有两个意外跳转。还有就是如“91 视频”这样以数字、字母开头的就无法跳转了。简单做的,将就用吧。希望有大佬能做一个真正检测中文的规则解决这个问题。)

https://raw.githubusercontent.com/Asstiff/Google-Canada-to-Normal/main/wiki.conf

from iringo.

WordlessEcho avatar WordlessEcho commented on August 23, 2024

倒也不是没有办法,只是如果遇到了别的语言怎么做呢?
https://stackoverflow.com/questions/17564837/how-to-know-if-a-url-is-decoded-encoded

from iringo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.