Delete AdSense element from screenshot.

This commit is contained in:
John Wiseman 2020-03-04 13:51:30 -08:00
parent e910eddc4a
commit 2be3df79c4

View File

@ -40,6 +40,15 @@
(/ (.getTime (js/Date.)) 1000))
(defn delete-node [page selector]
(.evaluate
page
(fn [selector]
(let [node (.querySelector js/document selector)]
(.removeChild (.-parentNode node) node)))
selector))
(defn screenshot-aircraft
([icao lat lon]
(screenshot-aircraft icao lat lon {}))
@ -70,6 +79,7 @@
url
(clj->js {:referer "https://adsbexchange.com/"}))]))
(timeout 3000)
(delete-node page "#adsense")
(p/all [(.type (.-keyboard page) "l")
(timeout 1000)])
(let [path (get options :output-path (str "screenshot-"