2

What I basically want to do is search a webpage for a piece of data (the XX.XX), always contained within:

&nbsp;XX.XXg</FONT>

I've read quite a bit about site scrapping and the such, but couldn't find the solution yet.

Now, I would have ranges set up somehow in a table, with matching numbers. I would want to see on which range that XX.XX is and take the data correspondent for the XX.XX.

To be more precise XX.XX would be a weight in grams and what it would be in the table would be the shipping price.

Way to do this?

Ron van der Heijden
  • 14,803
  • 7
  • 58
  • 82
Brick Top
  • 85
  • 2
  • 13

1 Answers1

1

what have you tried so far, friend?

I would suggest placing the data contained in your font tag to a variable, then querying your database with the content of the variable.

It would be best to place your code, so that we can help you better.

Malcolm Salvador
  • 1,476
  • 2
  • 21
  • 40
  • Howdy! The only thing I've been able to do is with Python, search the data on the font tag, and then querying it. Would it be better to do with PHP? Do you know a way with it? The problem is that the wpage with the font tag is not mine, so I'd need to do a search on the wpage for the things in the font tag and only take the XX.XX. I sincerely have no code, as I'm just starting it up. If you know your way around it, it would be much appreciated. – Brick Top Nov 23 '13 at 22:42
  • I see, so the webpage isn't yours and you want to parse it correct? PHP has methods for parsing webpages in html/xml. Have a look at [this](http://stackoverflow.com/questions/3577641/how-do-you-parse-and-process-html-xml-in-php) and [this](http://stackoverflow.com/questions/13458133/php-parse-html-tags). – Malcolm Salvador Nov 25 '13 at 00:30