Comments (12)
https://ftp.bmp.ovh/imgs/2020/08/7d7ac4f33316e5d2.jpg
https://ftp.bmp.ovh/imgs/2020/08/a3c41bc2489e8250.jpg
from lazystudy.
之前我注意到了,但是这种文章很少出现,能不能提供一下标题的id啊
from lazystudy.
已经有通过id获取标题的方法了
但是,偶尔有文章还是无法获取标题
from lazystudy.
text = 每日名胜|陕西·秦始皇帝陵博物院
我用4.1.1版本调试发现找不到
if ((id("general_card_title_id").findOnce(t).parent().parent().click() || id("general_card_title_id").findOnce(t).parent().parent().parent().click()) == true) {
同样找不到ID内容
if (id("xxqg-article-header").exists()) {
currentNewsTitle = id("xxqg-article-header").findOne().child(0).text(); // 最终解决办法
//currentNewsTitle = id("xxqg-article-header").findOne().text(); // 最终解决办法
}
这段内容,直接就跳下面了,
提个思路:文章和视频浏览以时间为点击进入浏览,获取文章/视频的标题为浏览成功1分。如果多个账户使用者在开始前把list表的标题清空。这样以当天时间点则不会出现重复浏览无效。
if (textContains("**广播电视总台").exists()) {
currentNewsTitle = textContains("**广播电视总台").findOne().parent().children()[1].text();
console.log("TX来源:"+currentNewsTitle);
} else if (textContains("央视网").exists()) {
currentNewsTitle = textContains("央视网").findOne().parent().children()[1].text();
console.log("TX来源:"+currentNewsTitle);
}
if ( myScores['我要选读文章'] < 6 ) {
DeletelistSql();//文章阅读积分未超过6,说明没有浏览过文章,则清空文章记录
}
/**
- @description: 删除list.db数据库的记录
- @param: sql
- @return: null
*/
function DeletelistSql( ) {
var dbName = "list.db";
var path = files.path(dbName);
var db = SQLiteDatabase.openOrCreateDatabase(path, null);
var Deletelistable = "DELETE FROM learnedArticles";
db.execSQL(Deletelistable);
db.close();
console.info("已清空文章阅读记录!");
}
from lazystudy.
之前的版本点击是用时间点击的,但是有人说很容易误触,而且容易点到视频,所以才用了控件
找不到控件麻烦检查一下强国的版本,我这边是2.15.1
然后关于数据库,虽然我不是很懂数据库操作。但是如果中间有些原因停止运行,第二次运行的时候肯定会删除数据库导致阅读不得分,不过可以在ui界面加入一个按钮,让大家手动删除
from lazystudy.
刚更新还是不行,ID控制找不到,
currentNewsTitle = textContains("作者").findOne().parent().children()[0].text();
这个获取是第一段文章吗?
截图[https://ftp.bmp.ovh/imgs/2020/08/f05c097b13f09cab.jpg)
from lazystudy.
currentNewsTitle = id("xxqg-article-header").findOne().child(0).text();
if ((id("general_card_title_id").findOnce(t).parent().parent().click() || id("general_card_title_id").findOnce(t).parent().parent().parent().click()) == true) {}
这段是用来点击进入阅读文章页面的
from lazystudy.
别人都能用啊,就你说获取不到标题
剩下的只是id方法获取不到标题,备用的方法
from lazystudy.
https://ftp.bmp.ovh/imgs/2020/08/fada9c6a9432a2c5.png
如图,无解了,我用的auto4.1.1版的
from lazystudy.
一是没必要通过标题来判断是否已经阅读过某文章,原来通过日期来判断已经很好的达到目的。二是如果确实要用,那么可以进入文章后获取文章标题,这样就很容易获取标题且不会出错。(也曾尝试过通过收藏按钮是否点亮来判断。就是在每读完文章后点收藏,然后以后就不会再读已经收藏的文章了)
from lazystudy.
一是没必要通过标题来判断是否已经阅读过某文章,原来通过日期来判断已经很好的达到目的。二是如果确实要用,那么可以进入文章后获取文章标题,这样就很容易获取标题且不会出错。(也曾尝试过通过收藏按钮是否点亮来判断。就是在每读完文章后点收藏,然后以后就不会再读已经收藏的文章了)
能给段代码吗? 如果是在订阅项好像有部分没有收藏的
from lazystudy.
文章标题:className("android.webkit.WebView").findOnce().text();
收藏点亮判断的代码没用了,一时找不到了。
from lazystudy.
Related Issues (20)
- 有问题反馈,请大神抽空解决。对战有一些问题来反馈一下 HOT 3
- 请问是用哪个版本插件打包应用的,我打包的都不能正常运行 HOT 1
- 双人答题 更新了界面 增加了随机匹配和邀请好友 原脚本没有在这个界面自动选择的代码 希望修复一下 ,默认选择 随机匹配就行 HOT 2
- 有几道题,根据提示选择的答案错误,而且在题库里修改答案修改不了。
- 版本是不是停止更新了啊
- 文章结束后 广播那会卡住 没法进行视频 只有手动返回主界面才可以
- 小米手机miui12 无法打开悬浮窗 HOT 1
- 有没有支持IOS的答题辅助? HOT 1
- 想法
- 老大软件是不是不更新了啊
- 几个建议 HOT 2
- 新版本在那儿能下载到? HOT 1
- 感谢!建议能将使用中遇到的不在题库里的题自动添加到题库
- 更新题库 tk.db反而变小了。 HOT 1
- 关于控件问题
- 大神还更新吗
- 大神 这个软件你还更新么? 获取不了题库了 HOT 1
- 请问 ,题库文件在安卓的路径及文件名叫什么,谢谢 HOT 1
- 元素找不到导致的自动化任务用不了
- 恳请大神告知题库手动新增题目的正确方法,非常感谢!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lazystudy.