Once you type the last line "print title, link, desc", press enter, remove
the indentation in the next line and press enter again.

On Fri, May 20, 2016 at 10:31 AM, <[email protected]> wrote:

> Hi all,
>
> This is probably a simple issue for users with more general shell
> experience than I but using scrapy shell in 1.0.3 if I start writing
> multiple lines like
>
> for sel in response.xpath('//ul/li'):
>     title = sel.xpath('a/text()').extract()
>     link = sel.xpath('a/@href').extract()
>     desc = sel.xpath('text()').extract()
>     print title, link, desc
>
> in the shell. How do I execute it ? Ctrl Z will prompt me to exit but is
> there actually a way to execute the above code in the shell and if I
> is it a good idea
>
> --
> 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 https://groups.google.com/group/scrapy-users.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
[image: Scrapinghub] <https://scrapinghub.com>

Valdir Stumm Junior
Software Engineer, Scrapinghub
[image: Skype] stummjr
[image: Twitter] <https://twitter.com/stummjr> [image: Github]
<https://github.com/stummjr>
[image: Twitter] <https://twitter.com/scrapinghub> [image: LinkedIn]
<https://www.linkedin.com/company/scrapinghub> [image: Github]
<https://github.com/scrapinghub>

*We turn web content into structured data. Lead maintainers of Scrapy
<http://scrapy.org>.*

-- 
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 https://groups.google.com/group/scrapy-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to