search

Home  >  Q&A  >  body text

python - Scrapy如何爬取多个不同页面?

PHPzPHPz2829 days ago708

reply all(2)I'll reply

  • 黄舟

    黄舟2017-04-18 09:28:21

    If a and b are independent, divide them into two spiders. One spider can use multiple items, if necessary.

    reply
    0
  • 怪我咯

    怪我咯2017-04-18 09:28:21

    If they are two independent target websites, it will be more flexible to write them separately.
    If it is the same website, assuming you have two items respectively: item, item, there are many URLs to crawl. These URLs can be obtained through the parsing of both items. After you obtain the URL, you can make a new request. That's it.

    reply
    0
  • Cancelreply