-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtext.html
More file actions
86 lines (71 loc) · 2.75 KB
/
text.html
File metadata and controls
86 lines (71 loc) · 2.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<!DOCTYPE html>
<html>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script src="./jquery.danmu.js/src/jquery.danmu.js"></script>
<body>
<div id="danmu"></div>
<script>
console.log(5 + 6);
$("#danmu").danmu({
height: "100%", //弹幕区高度
width: "100%", //弹幕区宽度
zindex :100, //弹幕区域z-index属性
speed:7000, //滚动弹幕的默认速度,这是数值值得是弹幕滚过每672像素所需要的时间(毫秒)
sumTime:65535, //弹幕流的总时间
danmuLoop:false, //是否循环播放弹幕
defaultFontColor:"#FFFFFF", //弹幕的默认颜色
fontSizeSmall:16, //小弹幕的字号大小
FontSizeBig:24, //大弹幕的字号大小
opacity:"0.9", //默认弹幕透明度
topBottonDanmuTime:6000, // 顶部底部弹幕持续时间(毫秒)
SubtitleProtection:false, //是否字幕保护
positionOptimize:false, //是否位置优化,位置优化是指像AB站那样弹幕主要漂浮于区域上半部分
maxCountInScreen: 40, //屏幕上的最大的显示弹幕数目,弹幕数量过多时,优先加载最新的。
maxCountPerSec: 10 //每分秒钟最多的弹幕数目,弹幕数量过多时,优先加载最新的。
});
$("#danmu").danmu("addDanmu",[
{ text:"这是滚动弹幕" ,color:"white",size:1,position:0,time:2}
,{ text:"这是顶部弹幕" ,color:"yellow" ,size:1,position:1,time:3}
,{ text:"这是底部弹幕" , color:"red" ,size:1,position:2,time:3}
])
$('#danmu').danmu('danmuStart');
</script>
<script>
const puppeteer = require('puppeteer');
const browser = await puppeteer.launch({ headless: true });
//如果為false則會開啟瀏覽器,適合用作於debug時。
const page = await browser.newPage();
var url = "https://tlk.io/ntustcc"
await page.goto(url);
//https://github.com/GoogleChrome/puppeteer/issues/1913
page = await browser.newPage();
await page.setRequestInterception(true);
page.on('request', (request) => {
if (['image', 'stylesheet', 'font', 'script'].indexOf(request.resourceType()) !== -1) {
request.abort();
} else {
request.continue();
}
});
// The result contains options, links, cookies and etc.
const result = await crawl();
// You can access the page object after requests
result.content = await page.content();
// You need to extend and return the crawled result
console.log(result.content)
// return result;
function getPostInfo() {
// let obj = {
// author: 'unknown',
// board: 'unknown',
// title: 'unknown',
// time: undefined
// };
document.getElementById("live")
let values = document.getElementByClass('post-message');
console.log(values)
return values;
}
</script>
</body>
</html>