D
Dudely
I have a situation where the data I want to pull off a website is
formatted at least 2 different ways that I'm currently aware of:
Sometimes I can pull the text like this:
userBody = IeDoc.getElementById("userbody").innerText
when the data is formatted like this:
<div id="userbody">
Beautiful Luxury Brick Home is West Cobb County. New; 4200 sq feet;
with 4 bedrooms, 3 1/2 BA, Living room, Dining room, Bonus Room, Den
(27x18),
However, there are times when the data is formatted like this:
<div id="userbody">
<div style="float: left; height: 1px; width: 1px; overflow:
hidden">nights Backed fraud acre Contact Making Leases care refrig
Take other Wood wooded closets elegant garden Moen extra</
div> You can Rent to Own any of our homes by
tomorrow!<br>
And I don't know how to access it. The data in this case starts with
"You can Rent to Own..." Actually, I might know how to access it, I
could simply look for the next div tag. The problem, is that I don't
know WHEN to look for that second div tag. Well, that's not quite
true either, I could in fact check to see if the next <div> has a
"footer" class, because that's what shows up next on the first example
data, but it seems like a kludge. I'm hoping there's a cleaner way -
such as perhaps being able to check to see if the div's overflow
attribute is hidden maybe?
Anyone know what I'm talking about and has a nice solution?
Thank you in advance.
formatted at least 2 different ways that I'm currently aware of:
Sometimes I can pull the text like this:
userBody = IeDoc.getElementById("userbody").innerText
when the data is formatted like this:
<div id="userbody">
Beautiful Luxury Brick Home is West Cobb County. New; 4200 sq feet;
with 4 bedrooms, 3 1/2 BA, Living room, Dining room, Bonus Room, Den
(27x18),
However, there are times when the data is formatted like this:
<div id="userbody">
<div style="float: left; height: 1px; width: 1px; overflow:
hidden">nights Backed fraud acre Contact Making Leases care refrig
Take other Wood wooded closets elegant garden Moen extra</
div> You can Rent to Own any of our homes by
tomorrow!<br>
And I don't know how to access it. The data in this case starts with
"You can Rent to Own..." Actually, I might know how to access it, I
could simply look for the next div tag. The problem, is that I don't
know WHEN to look for that second div tag. Well, that's not quite
true either, I could in fact check to see if the next <div> has a
"footer" class, because that's what shows up next on the first example
data, but it seems like a kludge. I'm hoping there's a cleaner way -
such as perhaps being able to check to see if the div's overflow
attribute is hidden maybe?
Anyone know what I'm talking about and has a nice solution?
Thank you in advance.