Hi,
You're experiencing the infamous 'added tbody' effect,
you've probably tested your XPath in your browser's developer tools panel.
The things is modern browser transform the document tree a bit internally,
and especially, they insert a tbody element between table and tr

If you try with the following (i.e. without the tbody in the XPath), you'll
get to the elements you want:

>>> response.xpath('//*[@id="gf-result-table"]/tr[2]/td[2]/div')
[<Selector xpath='//*[@id="gf-result-table"]/tr[2]/td[2]/div' data=u'<div
class="sr-number">\r\n            091'>]



On Thu, Feb 9, 2017 at 12:53 PM, I. Hathout <beckshath...@gmail.com> wrote:

> first of all i tried to extract data from this url:
> https://partsouq.com/en/search/search?q=0910112012&qty=1&_=1486640633959
>
>
> $ scrapy shell "https://partsouq.com/en/search/search?q=0910112012&;
> qty=1&_=1486640633959
>
> but each time i tried to get any element using xpath i got an empty set !!!
>
> Could anyone please explain why this happens to me ?
>
>
> <https://lh3.googleusercontent.com/-SI5TJuMvwBY/WJxYJU82TaI/AAAAAAAAB6U/9y8PkKhjQa0ySrczWtrMYrwwHuVWOifugCLcB/s1600/ttt.png>
>
> --
> 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 scrapy-users+unsubscr...@googlegroups.com.
> To post to this group, send email to scrapy-users@googlegroups.com.
> Visit this group at https://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 scrapy-users+unsubscr...@googlegroups.com.
To post to this group, send email to scrapy-users@googlegroups.com.
Visit this group at https://groups.google.com/group/scrapy-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to