|
|
07/05/2009, 09:24 PM
|
#101 (permalink) | |
|
Member
![]() ![]() Join Date: Nov 2007
Location: Rhode Island, USA
Posts: 1,739
Likes Received: 15
Thanks: 381
Thanked 398 Times in 217 Posts
|
Quote:
That's an AWESOME link! That's exactly what I was looking for to learn Ajax functions! Thank you! Lemme know if you figured it out, or if you need more help with the slider functionality... I can try to help you out on that if you still need help. Good Luck! |
|
07/06/2009, 01:23 AM
|
#102 (permalink) |
|
Member
![]() ![]() Join Date: Jun 2009
Location: Chicago
Posts: 316
Likes Received: 0
Thanks: 32
Thanked 166 Times in 26 Posts
|
this thread has motivated me to make my own apps. check out my tic tac toe one in the homebrew section. any advice from the people in this thread would be appreciated
|
07/06/2009, 01:19 PM
|
#104 (permalink) | ||
|
Member
![]() ![]() Join Date: Nov 2007
Location: Rhode Island, USA
Posts: 1,739
Likes Received: 15
Thanks: 381
Thanked 398 Times in 217 Posts
|
Quote:
Quote:
haha so I just found out for sure that any website you want to access with the Ajax calls needs to support it and needs to "post" said Ajax components which can then be received by clients (i.e. your app). *SIGH*. So lame... I guess I might end up doing a "webview" widget for my app... we'll see... |
||
07/06/2009, 01:30 PM
|
#105 (permalink) |
|
Member
![]() Join Date: Jun 2009
Posts: 179
Likes Received: 0
Thanks: 14
Thanked 24 Times in 9 Posts
|
Anybody want to throw me a link teaching me how exactly to put the appsi make onto the pre sdk? Can't seem to figure it out, just want to test out the hello world app.
|
07/06/2009, 01:46 PM
|
#107 (permalink) | |
|
Member
![]() ![]() Join Date: Nov 2007
Location: Rhode Island, USA
Posts: 1,739
Likes Received: 15
Thanks: 381
Thanked 398 Times in 217 Posts
|
Quote:
Code:
1. open up command prompt (start -> type in "cmd")
1a. right click and run as admin if you're on Vista
2. type cd .. until you get to the "C:/>" directory
3. Type in cd Palm/SDK/share/tutorial
3a. This is assuming you installed the SDK directly on your C drive and not
in a folder or in Program files
4. type in:
|
|
07/06/2009, 04:10 PM
|
#108 (permalink) |
|
Member
![]() ![]() Join Date: Jun 2009
Posts: 30
Likes Received: 0
Thanks: 4
Thanked 2 Times in 2 Posts
|
Hey Sirata, maybe you can web scrape/screen scrape for the data you want from the site instead? I've never done it but I know friends who have had to use such techniques to get the data they needed. I don't have too much knowledge more to offer on it but I am sure there is a lot of info on the web.
|
07/06/2009, 04:23 PM
|
#109 (permalink) | |
|
Member
![]() ![]() Join Date: Nov 2007
Location: Rhode Island, USA
Posts: 1,739
Likes Received: 15
Thanks: 381
Thanked 398 Times in 217 Posts
|
Quote:
Thanks for the suggestion! I figured I might just end up doing that. I REALLY wanted to pull out the data and format it into a really nice, clean looking, Pre formatted table... but I might just end up doing it the "ghetto" way... we'll see... I'm kind of busy working right now... I'll start looking into it more later tonight. I will definitely post my progress up here for any "noob" like me who wants to try it.
|
|
07/06/2009, 05:23 PM
|
#110 (permalink) |
|
Member
![]() ![]() Join Date: Jun 2009
Location: Silicon Valley, California
Posts: 1,025
Likes Received: 0
Thanks: 37
Thanked 444 Times in 161 Posts
|
If you want to scrape pages, you will want to learn about regular expressions in JavaScript. That is a method for finding patterns in text. For example, if you could figure out that the particular piece of data you want is always formatted a certain way, you could use regular expressions to find and extract that data from the source HTML of a web page.
|
07/06/2009, 05:36 PM
|
#111 (permalink) | |
|
Member
![]() ![]() Join Date: Nov 2007
Location: Rhode Island, USA
Posts: 1,739
Likes Received: 15
Thanks: 381
Thanked 398 Times in 217 Posts
|
Quote:
|
|
07/06/2009, 05:53 PM
|
#112 (permalink) |
|
Member
![]() ![]() Join Date: Jun 2009
Location: Silicon Valley, California
Posts: 1,025
Likes Received: 0
Thanks: 37
Thanked 444 Times in 161 Posts
|
Yes. You would look for a pattern that you could match in the HTML source of the page.
Say you're looking for name of a product from a site that let's you search by model number. If for example, the product name was always contained in a table cell with a unique format, you could try to match that pattern. <td class="someclass">Bike Helmet</td> You could look for a pattern like <td class="someclass">*</td> and extract your text out of the piece of HTML source that matches your pattern. You need a good tutorial on regular expressions. They don't actually use an asterisk as a wildcard. There are certain codes for letters, numbers, symbols, whitespace, etc. Another option would be to parse the DOM of a results page. If you can figure out exactly where a piece of data will show up in the DOM structure of a webpage, you can just do a getElementById (if it has a valid ID) and pull the value of the element. You can also just get to an element via it's DOM hierarchy. |
07/06/2009, 06:42 PM
|
#114 (permalink) |
|
Member
![]() ![]() Join Date: Jun 2009
Location: Silicon Valley, California
Posts: 1,025
Likes Received: 0
Thanks: 37
Thanked 444 Times in 161 Posts
|
You want to view the HTML source of the page. The idea is to use either pattern matching with regular expressions or DOM (Document Object Model) techniques to analyze the HTML source to find and extract a particular piece (or pieces) of data. The best approach depends on the makeup of the particular page you are trying to scrape.
|
07/06/2009, 07:14 PM
|
#115 (permalink) | |
|
Member
![]() Join Date: Feb 2009
Posts: 25
Likes Received: 0
Thanks: 1
Thanked 10 Times in 2 Posts
|
Quote:
We're definitely looking into doing this. However, we may end up having to rewrite a lot of it to avoid "distributing" or "reproducing" Palm-owned materials. I'll keep you guys updated. |
|
07/06/2009, 07:18 PM
|
#116 (permalink) | |
|
Member
![]() ![]() Join Date: Nov 2007
Location: Rhode Island, USA
Posts: 1,739
Likes Received: 15
Thanks: 381
Thanked 398 Times in 217 Posts
|
Quote:
Thanks! Hey Ken, I figured there might be some problems with that, but I'm sure you guys can figure it out. I really hope you're able to keep a well organized library of all the functions, that would help a LOT. Good luck! |
|
07/06/2009, 09:30 PM
|
#117 (permalink) |
|
Member
![]() Join Date: Jun 2009
Posts: 73
Likes Received: 0
Thanks: 5
Thanked 7 Times in 6 Posts
|
web scraping tutorial
Web scraping tutorial : CodeDiesel |
07/06/2009, 09:35 PM
|
#118 (permalink) |
|
Member
![]() ![]() Join Date: Jun 2009
Location: Silicon Valley, California
Posts: 1,025
Likes Received: 0
Thanks: 37
Thanked 444 Times in 161 Posts
|
That tutorial will help some, especially the firebug part. However, you will need to learn how to manipulate and parse the DOM using javascript.
|
07/06/2009, 10:20 PM
|
#119 (permalink) |
|
Member
![]() ![]() Join Date: Nov 2007
Location: Rhode Island, USA
Posts: 1,739
Likes Received: 15
Thanks: 381
Thanked 398 Times in 217 Posts
|
Oh awesome! Thanks guys! I really wanna start doing this but I promised a couple people that I'd help them with their apps... so that's what i'm working on right now. >.<.
You know, the tutorial uses Firebug to inspect the code, you don't even need to do that? On firefox you can just highlight something and click "View Selection Source" and it will give you the HTML code for that item, or you can just right click anywhere and hit "View Page Source". Isn't that basically what they're using Firebug in the tutorial for? And Blubble, yeah I noticed that I didn't quite catch the calls and specifications given to the scraping function... so I guess I have to look into that as well... YARG... soon... >.< Thanks for all your help guys! |
07/06/2009, 10:27 PM
|
#120 (permalink) |
|
Member
![]() ![]() Join Date: Jun 2009
Location: Silicon Valley, California
Posts: 1,025
Likes Received: 0
Thanks: 37
Thanked 444 Times in 161 Posts
|
Looking at the source is fine, but if you don't understand DOM structure well, Firebug can be very helpful. I know that some of my designers at the office rely on it a lot when they are working on HTML/CSS.
|
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|



