Fix imports for Python 3
This commit is contained in:
parent
fa69d80b8d
commit
f2839b727f
@ -2,10 +2,13 @@
|
|||||||
;;; Copyright (c) Paul R. Tagliamonte, 2013, MIT/Expat license.
|
;;; Copyright (c) Paul R. Tagliamonte, 2013, MIT/Expat license.
|
||||||
|
|
||||||
|
|
||||||
(import [urllib2 [urlopen]]
|
(import [lxml [etree]]
|
||||||
[lxml [etree]]
|
|
||||||
[sys [argv]])
|
[sys [argv]])
|
||||||
|
|
||||||
|
(try
|
||||||
|
(import [urllib.request [urlopen]])
|
||||||
|
(catch [ImportError]
|
||||||
|
(import [urllib2 [urlopen]])))
|
||||||
|
|
||||||
(defn get-rss-feed-name [tumblr]
|
(defn get-rss-feed-name [tumblr]
|
||||||
(kwapply (.format "http://{tumblr}.tumblr.com/rss") {"tumblr" tumblr}))
|
(kwapply (.format "http://{tumblr}.tumblr.com/rss") {"tumblr" tumblr}))
|
||||||
|
Loading…
Reference in New Issue
Block a user