Alright, here is the starting point. I want to make my life easier first and then it’ll probably make someone else’s life easier as well.
We got this baller mall here in Saint Petersburg. How do I know it’s baller? Some middle eastern prince owns that shit. The place got like 300 stores, and maybe I don’t know probably like 150 of those at the very least are clothing stores.
So I’mma make a list of all of them that sell shoes with their websites and jack the information from the sites.
I have no fucking clue how to do this. Right now my best bet is to just jack the HTML code get a link to each of the items photo and the price.
Now here is the problem with that approach: Whenever I get the HTML code from the site, the shit is always gonna be different. Every site has the needed part: list of items, somewhere different. So I’ll probably have to write a program to process information from each 150 sites. Maybe later I’ll figure out a better way, but first let’s just do one and see how it goes. (Yeah on second thought, not maybe but definitely)
As far as I can tell, girls buy shit more often than guys and are less likely to buy that shit of amazon. So Imma pick some girls store. So this shit’ll work out: stradivarius.com/ru/
I am not a fucking loser so of course I only write in Chad Swift (fight me). Front-end and Back-end. Yes that shit is possible.
I jacked some poor guys project (like hell Im gonna write any meaningful code) of of Github that allows you to swipe on emojis Tinder-style and wrote a simple class to act as a way to store the data I receive from my eventual backend. Maybe a struct would have been better, but I never claimed to be a good programmer. Right now I’mma keep it simple: URL to image, Name of Shoe and Price.
So I got my amazing ass class and I gotta set up a backend. But I decided that shit was to bothersome for me at the moment and kind of said fuck it. Later, LATER.
New plan, just get the information, upon loading the app, straight away into a string and then process that shit into something coherent.
Now here is the thing about Swift. It’s an absolutely Chad language. However, not a lot of programmer are Chads, therefore, there isn’t like a metric ton crapload of libraries that I can use to make my life easier.
So there isn’t really easy to use HTML parser (or even hard to use) in swift 5 (I found grandmas Swift 3 parser), so everything is gonna be built, in house. Imma take the string in which the data from the site is stored, cut that shit off and write a function that does the same for each object in the list.
Take each Object, create a class object out of it and plop that shit into an array. The rest is easy, that fucker on github did half the work for me (although he had a terrible swipe UX so Imma have to change that later but its 4 a.m, and I’m tired). First prototype done, lets see what Imma do next.