shawenguan 2 년 전
부모
커밋
e33e6a931f
1개의 변경된 파일4개의 추가작업 그리고 5개의 파일을 삭제
  1. 4 5
      Scripts/tglinks/tglinks.js

+ 4 - 5
Scripts/tglinks/tglinks.js

@@ -4,12 +4,11 @@ if(!$response){
     return
 }
 let html = $response.body || '';
-let regex = /<a class="tgme_action_button_new shine" href="([\S]+)">([^<]+)<\/a>/;
-
 console.log("###tglinks###");
-console.log(html)
-// let regex = /<div class="tgme_page_action">\s*<a class="tgme_action_button_new shine" href="([\S]+)">([^<]+)<\/a>\s*<\/div>/;
-// let matches = html.match(regex);
+let regex = /<div class="tgme_page_action">\s*<a class="tgme_action_button_new shine" href="([\S]+)">([^<]+)<\/a>\s*<\/div>/;
+let matches = html.match(regex);
+console.log(JSON.stringify(matches));
+
 // if (matches) {
 //     let allContent = matches[0];
 //     let originalHref = matches[1];