Information générale
Catégorie:
Applications Internet
Lisa,
You are correct saying "Your technique and goals, however, only work properly if you can guarantee certain content on a page".
The reality however is that there are needs to work with web pages that you cannot control. Yes, as soon as the Web admin group changes something, the program stop working and you need to change the code. But it does not happen very often and usually it requires minor changes in the code.
Another approach is to contact the Web owner, and pay him for delivering the information you need, and in the format you need: it is how the well established companies doing the business. But in many cases it is not appropriate for small businesses and individuals.
>STRCONV() works in 7 and 8, yes, but not with charsets and codepages -- only locale IDs, which does not always provide the appropriate match for the encoding/charset information in a web page.
>
>IOW:
>
>STRCONV(x,5,1251,1)
>
>But, let's not belabor that...
>
>I see why you need the DOM document in your scenario.
>
>Please take a look at READURL (you will find it on MSDN). It will give you the page and you can parse it. You can still bring the IE document up separately to handle the end result.
>
>Your technique and goals, however, only work properly if you can guarantee certain content on a page, IOW you are tightly coupling the content of your program to the web page, which is usually not a good practice.
>
>The only time it is appropriate to make these assumptions is when you have control over the content of the web page.
>
>If that is the case here, then IMHO you have different options that should not have encoding problems. For example, you could id/class attributes to "anchor" your code to particular interface elements, regardless of their titles and captions, or values, and regardless of whether these visible attributes were parseable. You could also create hidden elements on the page before the ones in which you were interested, "next element" would be the right one.
>
>Heck, you might be able to do the whole thing completely differently, by passing your Fox values to a piece of script in the document and executing that script.
>
>Yes, it does require that you have control of the content of the document -- but, as I say, I don't see how you can screen scrape for particular values in a caption or title with confidence *without* such control.
>
>>L<
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement