Skip to content

Instantly share code, notes, and snippets.

@b051
b051 / html5video.applescript
Last active June 22, 2021 05:34
html5 video
on openM3U8(m3u8)
say "Opening video.."
tell application "QuickTime Player"
open URL m3u8
activate
end tell
end openM3U8
tell application "Safari"
set currentTab to current tab of first window
@b051
b051 / stringutils.py
Created March 31, 2011 13:44
tide html
# encoding: utf-8
import re
import datetime
import logging
import htmlentitydefs
htmlentitydefs_pattern = re.compile("&#?\w+;", re.U)
#clean_non_ascii = re.compile(r'[^\x00-\x7f]')
clean_rnrn = re.compile(r'[\r\n]+')
javascript:document.location.href=document.location.href.replace(/ikan\.pptv\.com\/p\/(\d+).*/,%20'ipad.pptv.com/play_$1.htm')