Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #19586
| Newsgroups | comp.lang.javascript |
|---|---|
| Subject | Re: OT (Probably ??) -- on Parsing a complex web page |
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
| References | <aufgi5Frkj0U1@mid.individual.net> |
| Date | 2013-05-02 18:19 +0200 |
| Message-ID | <XnsA1B4BA64EE41eejj99@194.109.133.133> (permalink) |
Mel Smith wrote on 02 mei 2013 in comp.lang.javascript: > Hi: > > Soon, I'll be using the CURL package (in particular, the libcurl > library) to download approx 20,000 pages with the same structure but > different values. THe pages are each approx 64K bytes > > These values are mostly in the <tr> and then <td> elements of the > second > table in this complex page. > > Here is an example of the id of a particular <td> element: > > *********************************************************************** > ******************** > id="ctl00_ContentPlaceHolder1_bindingPanel_xxxxcard1_RadGridCard_ctl00_ > ctl05_GECBtnExpandColumn" > *********************************************************************** > ******************** > > and I have about 20 of these <td> elements in each of these some > 20K > pages to pick out and save away in a database. > > The Question: > > Is there any server-end package that can easily 'get into' the > downloaded page and pick out the values for the <td> elements that I > need ?? What is a "downloaded page" when thinking serverside??? > Can server-side JavaScript look at these pages Yes, like any other serverside language. > and pick out <td> values ?? If you mean the contend delimited by <td>...</td>'s. Get the file and make a string of the content. Use regex to delimit <td>...</td>? the strings you need. Perhaps using match() or execute() to have those strings in an array. Do your worst with that array. Or even better, put them into a serverside database, and sql-peruse that.. > Altho I use JS daily building my apps, I ve never used JS on my > *server* (I don't even no *how* to !) No better moment than this to start learning. > -- just my own Harbour language (C-based) tools. > > I'm ready to start 'parsing', but its real brain-burner to get > into > doing this with my own language --- even with its strong string > functions. Regex will help you. Old fashioned parsing is probably to slow, and in any case less fun. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
OT (Probably ??) -- on Parsing a complex web page "Mel Smith" <med_cutout_syntel@aol.com> - 2013-05-02 09:54 -0600
Re: OT (Probably ??) -- on Parsing a complex web page "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-05-02 18:19 +0200
Re: OT (Probably ??) -- on Parsing a complex web page "Mel Smith" <med_cutout_syntel@aol.com> - 2013-05-02 13:39 -0600
Re: OT (Probably ??) -- on Parsing a complex web page Scott Sauyet <scott.sauyet@gmail.com> - 2013-05-02 10:41 -0700
Re: OT (Probably ??) -- on Parsing a complex web page Denis McMahon <denismfmcmahon@gmail.com> - 2013-05-02 19:05 +0000
Re: OT (Probably ??) -- on Parsing a complex web page "Mel Smith" <med_cutout_syntel@aol.com> - 2013-05-02 13:41 -0600
csiph-web