Welcome back from a thrilling weekend! I hope everyone is pumped for Monday. If not maybe today's problem will bring you a quick laugh.
Today is my first day working at Imgur. In honor of my first day, today's Problem of the Day will be to create a program that opens up a random Imgur image every time it is run. To get a random image simply generate a random 5 or 7 character alphanumeric string. Then append that string to "http://imgur.com/gallery/" Here are two examples:
- vvdBmro -> http://imgur.com/gallery/vvdBmro
- Gy6PK -> http://imgur.com/gallery/Gy6PK
Note: Your program should actually open the image in a browser and not just print out the string.
Comments:
jedrek - 10 years, 7 months ago
Actionscript 3:
reply permalink
D - 10 years, 7 months ago
Python 3. Needs the "open" command (works on Mac OS X).
reply permalink
Dustin - 10 years, 7 months ago
Built with Python 2.7 and Flask. For 5 characters goto 127.0.0.1/5 For 7 characters goto 127.0.0.1/7
reply permalink
duddles - 10 years, 7 months ago
Congrats on the new job!
reply permalink
duddles - 10 years, 7 months ago
forgot the imports:
reply permalink
Anonymous - 10 years, 7 months ago
Cool, didn't know about "webbrowser".
reply permalink
duddles - 10 years, 7 months ago
I actually learned about it from this site when someone used it for the digital typewriter PotD!
reply permalink
Max Burstein - 10 years, 7 months ago
Thanks!
reply permalink
D - 10 years, 7 months ago
And now in J!
reply permalink
keemz - 10 years, 7 months ago
reply permalink
Jake - 10 years, 7 months ago
In js
reply permalink
Emre Ozdemir - 10 years, 7 months ago
reply permalink
Anonymous - 10 years, 7 months ago
One of the random images I got was NSFW!
reply permalink
Anonymous - 10 years, 7 months ago
Python
IPython version:
reply permalink
Anonymous - 10 years, 6 months ago
Some of those images are NSFW!
reply permalink