diff options
Diffstat (limited to 'emacs/.emacs.d/lisp')
m--------- | emacs/.emacs.d/lisp/hmm.el | 0 | ||||
-rw-r--r-- | emacs/.emacs.d/lisp/my/my-web.el | 18 |
2 files changed, 18 insertions, 0 deletions
diff --git a/emacs/.emacs.d/lisp/hmm.el b/emacs/.emacs.d/lisp/hmm.el -Subproject 2157ead39273691013c38529b14953ea839c2a5 +Subproject a0660da71f9aef8909973e9fd44b5eb34db0386 diff --git a/emacs/.emacs.d/lisp/my/my-web.el b/emacs/.emacs.d/lisp/my/my-web.el index 311bcf9..3aaddb8 100644 --- a/emacs/.emacs.d/lisp/my/my-web.el +++ b/emacs/.emacs.d/lisp/my/my-web.el @@ -148,5 +148,23 @@ (kill-new url) (message "Copied link: %s" url))) +;;; webgetter +(require 'my-net) +(require 'luwak) +(defun my-open-spectator-au (url &optional no-overwrite) + (interactive "sspectator.com.au link: ") + (let ((url-request-extra-headers '(("X-Forwarded-For" . "66.249.66.1"))) + (url-user-agent "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)")) + (let ((file-name + (if no-overwrite + (my-make-unique-file-name + (my-make-file-name-from-url url) + my-download-dir) + (expand-file-name + (my-make-file-name-from-url url) + my-download-dir)))) + (url-copy-file url file-name (not no-overwrite)) + (luwak-open (format "file://%s" file-name))))) + (provide 'my-web) ;;; my-web.el ends here |