The link you sent gives reasons why not to use the live DOM inspector.
It's not concerned with using a complete xpath, although bruce gives some
good reasons as to why not to do that.

The link you sent is saying not to just blindly use the live DOM inspector,
as both browser-logic (FF adding <tbody> elements) and javascript can
modify the DOM.

If you're trying to select the modified elements, obviously scrapy won't be
able to do it.

So it's really just a caveat saying that your browser and js engine could
modify the DOM from the original state, and that scrapy only has the
initial (un-modified) state.

On Wed, Sep 16, 2015 at 8:14 AM, bruce <[email protected]> wrote:

> Hi.
>
> When dealing with scraping, and using xpath/dom operations, you need
> to always keep in mind, that the overall structure of the content is
> subject to change. It's fragile. If you use a "complete" xpath from
> the root(top) to the item in question, any "change" along the way, can
> result in an error. Unless you have sufficient error checking, your
> app might not "know" the reason for the error.
>
> If you create an xpath, that has the "minimum" of attributes to get
> you to where/what you need, it's more robust. But, it's still fragile,
> just not as fragile as using the complete xpath...
>
>
>
> On Wed, Sep 16, 2015 at 5:50 AM, michio basya <[email protected]> wrote:
> > Hi,
> >
> >
> > I have a question that why never use full xpath.
> > I have been developing crawler with full xpath, and I notice this
> sentence
> > in the documents.
> >
> > Are these reasons a tbody problem and a live browser dom problem? Or any
> > other reasons?
> > If the reasons are only two problems, I will keep developing with full
> > xpath.
> > So please teach me any other reason to prevent a future problem.
> > Thanks,
> >
> >
> http://doc.scrapy.org/en/1.0/topics/firefox.html#caveats-with-inspecting-the-live-browser-dom
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "scrapy-users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to [email protected].
> > To post to this group, send email to [email protected].
> > Visit this group at http://groups.google.com/group/scrapy-users.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "scrapy-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/scrapy-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"scrapy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/scrapy-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to