This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'net/http' | |
require 'rio' | |
body = Net::HTTP.get 'minneapolisfuckingrocks.blogspot.com', '/2009/01/diplo-remix-collection.html' | |
body.scan(/http:\/\/[a-zA-Z0-9_\.\/]*mp3{1}/).each {|link| rio(link) > rio(File.basename(link))} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 2023.4.23 更新,修复 gtag.js 加了个回车导致失效的问题 | |
// 2023.3.2 更新,修复上报到 region*.google-analytics.com 未被代理的问题 | |
addEventListener('fetch', (event) => { | |
// 这里可以加 filter | |
return event.respondWith(handleRequest(event)); | |
}); | |
// worker 应用的路由地址,末尾不加 '/' | |
const DOMAIN = 'https://example.workers.dev/routerpath'; |