Giter VIP home page Giter VIP logo

Comments (5)

Kenshin avatar Kenshin commented on May 9, 2024

感谢建议~
我想到了一个解决办法,但不一定靠谱,需要回去后才能实验。
我在外面休假…
如果方便的话,最好给我一些 Wordpress 站,这样可以做个参考。

from simpread.

Kenshin avatar Kenshin commented on May 9, 2024

@jinyu121

刚刚确认了几个 Wordpress 的站,并没有你说的

wp-content/themes/年份的英文

这个情况。

但似乎某些站的结构比较相似,比如 标题 和 正文 具有相同的 html 节点,但它们的域名不可能有任何规则。

虽然目前的简悦是不支持这种情况的,未来可以增加这类网站,但前提是如何来识别某个页面是否是 Wordpress,目前唯一可以利用的是

<meta name="generator" content="WordPress 4.8">

但似乎不是每个站都有这个 htm 标识,同时也只是某些站才具有上述的相同标识。

from simpread.

jinyu121 avatar jinyu121 commented on May 9, 2024

那就给你几个特征吧:

主题年份 特征 预览链接
2017 id='twentyseventeen-fonts-css' 这里
2016 id='twentysixteen-fonts-css' 这里
2015 id='twentyfifteen-fonts-css' 这里
2014 id='twentyfourteen-lato-css' 这里

而且好像正文部分都叫做entry-content

并且路径里面也会有wp-content/themes/twentyXXXXX字样。例如wp-content/themes/twentyfourteen/style.css等。

一般来说,Wordpress的判断可以通过wp-contents这个关键字来看。or,某个css/js的路径中含有wp-content,99%的可能它是个Wordpress站。当然,若果使用了CDN等东西,则会失去这个特征。所以不太建议用是不是Wordpress站来区分,而是根据`是不是用了这些默认主题‵区分。

但是主题是千变万化的……带来的是结构千变万化。这里只讨论 默认主题/年份主题

from simpread.

Kenshin avatar Kenshin commented on May 9, 2024

@jinyu121
okay,我会参考你的建议,通过检索特定字符这个方案可行。
因为适配的逻辑改变了, 适配某类站 而非通过 url判断 这个功能可能需要 1.1.0 之后才会去做。

话说,使用 Wordpress 默认主题的站很多吗?我昨天在测试时,应该一个都没找到...

from simpread.

Kenshin avatar Kenshin commented on May 9, 2024

简悦最新版 1.1.1 已经解决了这个问题,此 issues 关闭。

增加了 智能适配模式 详细 请看这里

同时,新增功能可以 访问这里

from simpread.

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.