jacensolo
August 21st, 2008, 05:19 AM
I love coding and have done it off and on for a number of year, but I have never gotten very far. I've done a number of different languages but have never made a real world app, something I will actually use that I have been proud of making. Upon learning python I read somewhere to think of something I do, and write a script to automate it. It seemed everything I do is already easy though. But then I finally thought of something I could do fairly easily and actually use it, so I thought.
Http://www.woot.com is a site that has a different item up every day for relatively cheap price. I usually check it daily. What I want to do is make a script that takes the title, picture, price, and description, print it, and save it to a disk. Seems pretty easy, right?
I can open a file and save it fine. My problem is getting the description out of the tags. I suppose I could use re, but that just seems painful for something like this. I think what I want to do is use an html parser. I've looked at Python's api and tutorials, but it's one of those things that is not clicking. I also Googled for more tutorials but n one of them helped either. I think it is something about inheriting the class and changing the meathods. I understand inheritance, but from what I gather the original methods do nothing and are just a template. So I don't understand how this works... I'm lost just thinking about it.
Any help would be appreciated. :)
PS. Any other ideas for applications to make? Part of my problem is I can never think of what to make, so I just start learning a different language (just a tiny, tiny bit) to see if anything hit me. My current list includes: C, C++, Java, Dark Basic, C#, Visual Basic (took a class, didn't like it), Python (I think I know this the most as it is the most fresh, and it is my favorite) and I started peeking at lisp before I thought of this. Keep in mind this is over years as it was an on and off kind of thing. Python is from this year.
Edit: I forgot to add that I know I can save it as an html file and skip the parsing, but I want to print the description to the console also.
Http://www.woot.com is a site that has a different item up every day for relatively cheap price. I usually check it daily. What I want to do is make a script that takes the title, picture, price, and description, print it, and save it to a disk. Seems pretty easy, right?
I can open a file and save it fine. My problem is getting the description out of the tags. I suppose I could use re, but that just seems painful for something like this. I think what I want to do is use an html parser. I've looked at Python's api and tutorials, but it's one of those things that is not clicking. I also Googled for more tutorials but n one of them helped either. I think it is something about inheriting the class and changing the meathods. I understand inheritance, but from what I gather the original methods do nothing and are just a template. So I don't understand how this works... I'm lost just thinking about it.
Any help would be appreciated. :)
PS. Any other ideas for applications to make? Part of my problem is I can never think of what to make, so I just start learning a different language (just a tiny, tiny bit) to see if anything hit me. My current list includes: C, C++, Java, Dark Basic, C#, Visual Basic (took a class, didn't like it), Python (I think I know this the most as it is the most fresh, and it is my favorite) and I started peeking at lisp before I thought of this. Keep in mind this is over years as it was an on and off kind of thing. Python is from this year.
Edit: I forgot to add that I know I can save it as an html file and skip the parsing, but I want to print the description to the console also.