acloudtree

Category Uncategorized

XmasCall.com

Well I ended up having another fun idea. Took a bit of work, but the basic functionality exists. Head over and sign up and wish a random person a Merry Christmas. Lord knows we all could do with more of that.

http://XmasCall.com

How I Began Blogging for 8BIT

I have a post over on the 8BIT network explaining some success at blogging, joining a community, and the traction gained in the Agapage project.

You can read about it HERE.

28 years to kill narcissism

For all these years I have pursued myself. This is something that I think most people don’t even realize they are doing. And I have had a lot of extra time to think lately, as I hold and rock my daughter at night. So I boiled life’s choices down to the following list.

    • Serve yourself
    • Serve yourself while purposely serving another
    • Serve yourself and coincidentally serve another
    • Serve another

      I never realized, how much I thought I was giving to others, when in actuality the decision was still rooted (foundationally) in me. My desires aligned with theirs, and so I could get what I want as well as help another.

      That is until Gracie got here. She is what the word sacrifice was built on. Along with love, joy, exhaustion, worry, peace, fear, and happiness. I had twenty-eight years to get into myself, but it only took one minute for my daughter to unwind it all. She will not only have the best and worst of me. She will get all of me. The good and the bad, the smiles and the warts, and though its a wee bit scary, I am ok with that.

      I love you Gracie.

      -daddy

      gracie

      (Nerd) Python2.6, Screen scraping, and Javascript cookies

      Recently I tried *scraping some data from a website and was running into problems. I don’t have a fix at the moment but I made the first big break through.

      My first attempt at scraping the data with Python was met with immediate denial. And I was able to get similar results (though not exact) by disabling cookies in my browser (firefox3.5) and accessing the desired site. The fact that the results were not identical confused me some. But I figured it was a subtle difference in the way Firefox handled the request versus how I was handling the request programmatically with Python, mechanize, urllib2, and cookielib.

      Still, after several hours I still was unable to make the desired request to the server. So I started doing some digging. It turns out that these libraries are unable to automatically handle cookies set by Javascript. So, to test this, I disabled Javascript in my browser, made the request, and got the exact same results. YES!!!

      As a quick test I was able to extract the cookies’ value using the LiveHeader extension in Firefox. I then took this value and manually assigned it to the header of my Python request. I then got the desired results in my Python program. I’ll post an example of my solution when I get it up and running.

      Troubleshooting:

      In your browser I would do the following in order to try and recreate what is happening in your program.

      1. Disable Javascript
      2. Disable Cookies
      3. Access headers with Firefox plugin

      *Programmatically extracting data from a website

      Copyright © Jared Folkins
      Programming, Computers, Writing, Economics, and Life

      Powered by WordPress