贴吧邮箱采集器

邮箱采集器,目前支持百度贴吧,适配更多网站以及功能联系作者微信:bianbingdang

  1. // ==UserScript==
  2. // @name 贴吧邮箱采集器
  3. // @namespace Violentmonkey Scripts
  4. // @version 2.1
  5. // @description 邮箱采集器,目前支持百度贴吧,适配更多网站以及功能联系作者微信:bianbingdang
  6. // @match *://tieba.baidu.com/*
  7. // @require https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js
  8. // @require https://cdn.bootcss.com/clipboard.js/2.0.1/clipboard.min.js
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12.  
  13. $(document).ready(function () {
  14. //需要展示的邮箱
  15. var email_str = ''
  16. regex = /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/g
  17. let doc = $('body').html();
  18. emails = doc.match(regex) || [];
  19.  
  20. if (emails.length <= 1) {
  21. return
  22. }
  23.  
  24. emailsCopy = []
  25.  
  26. for (let email of emails) {
  27. if (email.indexOf('**') > -1) {
  28. continue
  29. }
  30. emailsCopy.push(email)
  31. }
  32.  
  33. let emailLength = emailsCopy.length
  34.  
  35. email_str = emailsCopy.join(';')
  36. if(email_str.length > 150){
  37. display_email_str = email_str.substring(0,150) + "...";
  38. }else{
  39. display_email_str = email_str
  40. }
  41. //创建页面
  42. let panel_rignt = $("#pb_content > div.right_section.right_bright")
  43. panel_rignt.prepend(`
  44. <div class="region_bright app_download_box" id="emials_box">
  45. <h4 class="region_header">
  46. <span class="title">本页面发现邮箱${emailLength}个</span>
  47. </h4>
  48. <div style="word-wrap:break-word">
  49. ${display_email_str}
  50. </div>
  51. <a id="copyEmails" href="javascript:;" data-clipboard-text=${email_str}>[复制邮箱]</a>
  52. <a id="closeEmails" href="javascript:;">[关闭该显示]</a>
  53. </div>
  54. </div>
  55. `)
  56.  
  57. $('#closeEmails').click(function () {
  58. $('#emials_box').fadeOut()
  59. })
  60. //剪贴板
  61. var clipboard = new ClipboardJS('#copyEmails');
  62.  
  63. clipboard.on('success', function (e) {
  64. console.log(e)
  65. alert("本页共发现邮箱" + emailLength + "个,已复制到剪贴板" + '\n' + "bugs可联系作者微信:bianbingdang")
  66. e.clearSelection();
  67. });
  68. }
  69. )

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址