diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..2ccbdcb
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml
new file mode 100644
index 0000000..3b31283
--- /dev/null
+++ b/.idea/inspectionProfiles/profiles_settings.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/clojure.xml b/.idea/libraries/clojure.xml
new file mode 100644
index 0000000..f5a5161
--- /dev/null
+++ b/.idea/libraries/clojure.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/clojure__2_.xml b/.idea/libraries/clojure__2_.xml
new file mode 100644
index 0000000..b9d32a4
--- /dev/null
+++ b/.idea/libraries/clojure__2_.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/replstate.xml b/.idea/replstate.xml
new file mode 100644
index 0000000..4735937
--- /dev/null
+++ b/.idea/replstate.xml
@@ -0,0 +1,4 @@
+
+
+ {:repl-history {:ide [], :local ["lein repl" "(use 'ariane.core)" "(use ariane.core)" "(+ 1 1)" "(-main)"], :remote []}}
+
\ No newline at end of file
diff --git a/ariane.iml b/ariane.iml
index e024f90..4667077 100644
--- a/ariane.iml
+++ b/ariane.iml
@@ -2,19 +2,19 @@
-
+
+
+
-
-
+
-
-
+
@@ -493,15 +493,6 @@
-
-
-
-
-
-
-
-
-
@@ -520,15 +511,6 @@
-
-
-
-
-
-
-
-
-
@@ -682,79 +664,5 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-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-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
\ No newline at end of file
diff --git a/lastrun.txt b/lastrun.txt
index 8654614..e3757a6 100644
--- a/lastrun.txt
+++ b/lastrun.txt
@@ -1 +1 @@
-Thu, 17 Jul 2014 22:03:06 +0000
\ No newline at end of file
+Tue, 09 Dec 2014 17:37:07 +0000
\ No newline at end of file
diff --git a/project.clj b/project.clj
index 3e2b1ad..5288f7b 100644
--- a/project.clj
+++ b/project.clj
@@ -3,7 +3,7 @@
:url "https://github.com/xicubed/ariane"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
- :dependencies [[org.clojure/clojure "1.5.1"]
+ :dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/data.zip "0.1.1"]
[clj-http "0.7.6"]
[clj-time "0.6.0"]
diff --git a/src/ariane/rss.clj b/src/ariane/rss.clj
index 7ec4c8a..9537933 100644
--- a/src/ariane/rss.clj
+++ b/src/ariane/rss.clj
@@ -74,21 +74,26 @@
(for [entry (zipxml/xml-> root :item)]
(if (ct/before? (ctf/parse custom-formatter (str @lastrun)) (ctf/parse custom-formatter (first (zipxml/xml-> entry :pubDate zipxml/text))))
(do (taxi/set-driver! {:browser :chrome} (str "https://share.flipboard.com/bookmarklet/popout?v=2&" (client/generate-query-string {"title" (first (zipxml/xml-> entry :title zipxml/text))}) "&" (client/generate-query-string {"url" (first (zipxml/xml-> entry :link zipxml/text))}) "&t=" (.getTime (new java.util.Date))))
- (taxi/wait-until #(taxi/exists? "#username"))
- (taxi/input-text "#username" (System/getenv "FLIPBOARD_USERNAME"))
- (taxi/input-text "#password" (System/getenv "FLIPBOARD_PASSWORD"))
- (taxi/submit (taxi/find-element {:tag :button, :text "Sign In"}))
- ; your magazine name
- (taxi/implicit-wait 10000)
- (taxi/click (taxi/find-element {:tag :h1, :text (System/getenv "FLIPBOARD_MAGAZINE")}))
- (taxi/click (taxi/find-element {:tag :button, :text "Add"}))
- (Thread/sleep 10000)
- (taxi/quit)
- (Thread/sleep 10000))
+ (taxi/implicit-wait 30000)
+ (taxi/wait-until #(taxi/exists? "#username"))
+ (taxi/input-text "#username" (System/getenv "FLIPBOARD_USERNAME"))
+ (taxi/input-text "#password" (System/getenv "FLIPBOARD_PASSWORD"))
+ (taxi/submit (taxi/find-element {:tag :button, :text "Sign In"}))
+ ; your magazine name
+
+ (taxi/click (taxi/find-element {:tag :h1, :text (System/getenv "FLIPBOARD_MAGAZINE")}))
+ (taxi/click (taxi/find-element {:tag :button, :text "Add"}))
+
+ (taxi/wait-until #(taxi/exists? {:tag :h1, :text "Success, all done!"} ) 15000)
+ ; (taxi/quit (taxi/find-element {:tag :h1, :text "Success, all done!"}))
+
+ ; (taxi/submit (taxi/find-element {:tag :button, :text "Add"}))
+ (taxi/quit))
+
(reset! lastrun @now)
- )
)
)
+)
(defn update
[]
@@ -109,5 +114,4 @@
{:infos (infos channel)
:entries (entries channel)
})
- )
-
+)
\ No newline at end of file
diff --git a/untitled/untitled.iml b/untitled/untitled.iml
new file mode 100644
index 0000000..10d8e13
--- /dev/null
+++ b/untitled/untitled.iml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file