tmp.js 894 B

123456789101112131415161718192021222324252627
  1. // ==UserScript==
  2. // @name T-美妆-爬虫
  3. // @author tianyunperfect
  4. // @description 简介
  5. // @version 1.0.0
  6. // @update 2021-07-08 16:16:14
  7. // @grant GM_registerMenuCommand
  8. // @include https://bebd.bevol.com/ranking?type=category
  9. // @require https://git.tianyunperfect.cn/tianyunperfect/web-base/raw/master/tmp/monkey/util.js?a=1
  10. // @require https://cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js
  11. // ==/UserScript==
  12. (async () => {
  13. GM_registerMenuCommand("!!!复制并加到memory", do1);
  14. async function do1 () {
  15. let res =[]
  16. let rows = (await getDomAll(".ant-table-tbody [data-row-key]"))
  17. for (let x in rows) {
  18. if (x < 50) {
  19. res.push(rows[x].getAttribute("data-row-key"));
  20. }
  21. }
  22. console.log(res)
  23. };
  24. })();