<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                ~~~ # -*- coding: utf-8 -*- import scrapy from scrapy_guokr.items import ScrapyGuokrItem class GuokrSpider(scrapy.Spider): name = 'guokr' allowed_domains = ['guokr.com'] start_urls = ['https://www.guokr.com/ask/highlight/'] def parse(self, response): node_list = response.xpath('//ul[@class="ask-list-cp"]/li') for node in node_list: item = ScrapyGuokrItem() item['focus_num'] = node.xpath('.//p[@class="ask-focus-nums"]/span/text()').extract()[0] item['answer_num'] = node.xpath('.//p[@class="ask-answer-nums"]/span/text()').extract()[0] item['title'] = node.xpath('.//h2/a/text()').extract()[0] item['href'] = node.xpath('.//h2/a/@href').extract()[0] # strip 去出空白字符 item['content'] = node.xpath('.//p[@class="ask-list-summary"]/text()').extract()[0].strip() # yield item # 詳情頁 yield scrapy.Request( item['href'], callback=self.parse_detail, meta={"item": item} ) # 下一頁 next_url = response.xpath('//a[text()="下一頁"]/@href').extract_first() if next_url is not None: yield response.follow(next_url, callback=self.parse) def parse_detail(self, response): item = response.mete['item'] # 包含 div_list = response.xpath("//div[contains(@class, 'answer gclear')]") for div in div_list: pass ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看