What I learned poking around a clothing shop’s website with Python

I wanted to share some things I learned recently when I was thinking about what I could do with Python, choosing an idea, and then working on it with help from my friend, who is a security engineer and hacker.

My idea was to poke around the clothing shop’s website and try to build something that would get me all the links of the items that would match what I was looking for. In hindsight, I basically made myself the Filter function in Python. Still cool though! Let’s see.. What did I learn?

Well, I learned that 1) downloading the correct version of Python was a whole shebang. I had 2.7 downloaded by default, and might have tried to download 3.0 sometime when I was feeling curious, and had a whole mess that Joel had to help me figure out. In the end, we symlink’d the binary files where brew installed python to the bin that the dumb machine was expecting the files to be (but weren’t.)

2) Setting up IPython was essential. So was pip.

3) Need to define a main function in Python. I was fascinated by the understanding I had about how we needed to export the function as a “module” for it to be able to run and not completely exit out of the program in the future as we add more code. As a person who forgot literally everything about Python since learning about it in my first year, I thought this was really cool.

4) I learned about hitting != 200 as a way to structure the program to be able to filter out errors quickly. Fun stuff, haven’t thought about that in a while.

5) I learned about piping into Jq to make json look prettier.

6) I enjoyed the experience of poking around the website and making a guess about how something works. It’s hilarious what websites really are out there, sometimes a discovery truly brings joy.

7) I enjoyed watching Joel work his Python magic. This is his shoutout here, thank you, Joel, for helping me go about this quest :) you are the best.

8) I enjoyed the satisfaction of seeing the final product! Let me know if you are interested in seeing what we did!



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Miche Wong

Miche Wong

The First Gen podcast creator. web3 and self care.