Wednesday, January 15, 2014

WANTED: Complete List of WhiteHouse.Gov Petitions

I've created a petition on to modify copyright law to prevent copyright of any law enacted in the United States at the Federal, State, and Local level.  This prevents jerk corporations from claiming copyright when someone tries to put the code/law/edict on a webpage.

But, there aren't enough signatures yet.  So I tried advertising to my FB friends.  I have to get to 150 before the petition is visible on the list of open petitions on the website.

That got me thinking:  how do I find all the other petitions that aren't available for viewing yet due to being not-advertised enough?

They provide a short-URL for these petitions.  This shortener probably is incremental.  Mine is  PLEASE SIGN IT and I figure the other petitions might have urls near it.

So, here's my program to find them:



nums1 = [x for x in range(65, 90)]
nums2 = [x for x in range(97, 122)]
nums = []
print nums

with open("/tmp/urls.wh", "w") as OFH:
    for i in nums:
        for j in nums:
            for k in nums:
                for m in nums:
                    OFH.write("\n" % (i, j, k, m))

# wget -a out.log -t 1 --read-timeout=3 --max-redirect 1  --save-headers

No luck yet, it takes a long time to run.

Post a Comment