This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-02-13
Channels
- # admin-announcements (1)
- # alternate-reality (2)
- # beginners (15)
- # boot (309)
- # cbus (1)
- # cider (4)
- # cljs-dev (4)
- # clojure (199)
- # clojure-madison (5)
- # clojure-russia (14)
- # clojurescript (59)
- # community-development (57)
- # core-async (5)
- # cursive (8)
- # datavis (6)
- # datomic (1)
- # dysphemism (11)
- # emacs (5)
- # euroclojure (1)
- # hoplon (3)
- # off-topic (103)
- # om (52)
- # onyx (3)
- # parinfer (1)
- # proton (15)
- # reagent (4)
Use #C06DT2YSY instead of #onnext I think. @adampash
Even David’s not in #C0DT1AZD3. We really, really, REALLY need to stop the proliferation of subchannels. This isn’t NTTP circa 1993.
So, I'm still working on a scraper that will work on secured pages. Using @donaldball's helpful advice, I figured out how to (a) get the CSRF-token as well as the cookies and (b) POST those and my creds and log in. I can tell I'm logged in because it returns 302. But, when I try to use clj-http
cookie store to GET the secured pages, it still won't let me.
Any ideas greatly appreciated, I feel like I'm pretty close here.
I don’t think I can help in this particular situation but if you have this code checked into Github or Bitbucket, it might give the context someone else could use to be of help.
I'm using phantomjs in a leiningen project, and I have to pass the path to the executable with :jvm-opts ["-Dphantomjs.binary.path=..."]
. Is there a way to set this with an environment variable so that the path is not hardcoded in my project.clj? Thanks!
hey @coyotespike, yes, or if you can share the code snippet to make the GET call, someone will be able to help...
@akiva @jonahbenton 😎 I'll prettify the code snippet a little and throw it in a gist
And here is the gist: https://gist.github.com/coyotespike/d01eff49341debaec5a4
hey @doddenino: couple of thoughts: * the app can just use (System/getenv) and (System/setProperty) directly. * you can populate a JVM_OPTS environment variable, and lein will pull those in (see bottom of https://github.com/technomancy/leiningen/blob/master/sample.project.clj) You can also do uglier things like have a system property that tells the app which environment variable to pull in with (System/getenv)
Yoicks! I just got it!
For the GET request to succeed, it has to use the same cookie store that the log-in POST has just updated. I think I wasn't doing that right. Pulling it out of the let-statement and into a variable, like (def cookie-store (cookies/cookie-store))
, fixed me up. Thanks for the prompt to refactor, guys 😉
that's called rubber duck debugging: https://en.wikipedia.org/wiki/Rubber_duck_debugging
lol yeah, I used to have a literal rubber duck - maybe I need to get him back