Scrapy not going to next page (follow links) when the url is constructed from a csv file
<p>Hi I have this simple scrapy file.  As you can see, I am adding ship imo number to the response.url().  But when i run the programme i do not get any results (no error messages as well). I have set the USER AGENT in settings.py.</p>

<pre><code>import re
import csv

import scrapy
from mcdetails.items import McdetailsItem

class GetVesselDetails(scrapy.Spider):
    name = "mconnector"
    allowed_domains = ["http://maritime-connector.com/"]
    start_urls = [
        'http://maritime-connector.com/ship/',
    ]

    def parse(self, response):
        with open('output.csv', "r") as f:
            mclist = csv.reader(f, delimiter=',')
            next(f)
            for l in mclist:
                if not l[1] in (None, ""):
                    # eg. 'http://maritime-connector.com/ship' + '849949'
                    mcurl = response.urljoin(l[1])
                    yield scrapy.Request(mcurl, callback=self.parse_ships_details)

    def parse_ships_details(self,response):
        item = McdetailsItem()
        # item = resonse.meta['item']
        item['v_name'] = response.xpath('//title/text()').extract_first()
        yield {'vessell name': item['v_name']}
</code></pre>

<p>and this the output.</p>

<pre><code>2016-10-01 15:37:52 [scrapy] INFO: Enabled item pipelines:
[]
2016-10-01 15:37:52 [scrapy] INFO: Spider opened
2016-10-01 15:37:52 [scrapy] INFO: Crawled 0 pages (at 0 pages/min), scraped 0 items (at 0 items/min)
2016-10-01 15:37:52 [scrapy] DEBUG: Telnet console listening on 127.0.0.1:6024
2016-10-01 15:37:53 [scrapy] DEBUG: Redirecting (301) to &lt;GET http://maritime-connector.com/robots.txt/&gt; from &lt;GET http://maritime-connector.com/robots.txt&gt;
2016-10-01 15:37:53 [scrapy] DEBUG: Crawled (404) &lt;GET http://maritime-connector.com/robots.txt/&gt; (referer: None)
2016-10-01 15:37:53 [scrapy] DEBUG: Crawled (200) &lt;GET http://maritime-connector.com/ship/&gt; (referer: None)
2016-10-01 15:37:53 [scrapy] DEBUG: Filtered offsite request to 'maritime-connector.com': &lt;GET http://maritime-connector.com/ship/8986080&gt;
2016-10-01 15:37:54 [scrapy] INFO: Closing spider (finished)
2016-10-01 15:37:54 [scrapy] INFO: Dumping Scrapy stats:
{'downloader/request_bytes': 1109,
 'downloader/request_count': 3,
 'downloader/request_method_count/GET': 3,
 'downloader/response_bytes': 25884,
 'downloader/response_count': 3,
 'downloader/response_status_count/200': 1,
 'downloader/response_status_count/301': 1,
 'downloader/response_status_count/404': 1,
 'finish_reason': 'finished',
 'finish_time': datetime.datetime(2016, 10, 1, 11, 37, 54, 36472),
 'log_count/DEBUG': 5,
 'log_count/INFO': 7,
 'offsite/domains': 1,
 'offsite/filtered': 913,
 'request_depth_max': 1,
 'response_received_count': 2,
 'scheduler/dequeued': 1,
 'scheduler/dequeued/memory': 1,
 'scheduler/enqueued': 1,
 'scheduler/enqueued/memory': 1,
 'start_time': datetime.datetime(2016, 10, 1, 11, 37, 52, 641119)}
</code></pre>

<p>The traceback speaks for itself:</p>

<pre><code>2016-10-01 15:37:53 [scrapy] DEBUG: Filtered offsite request to 'maritime-connector.com': &lt;GET http://maritime-connector.com/ship/8986080&gt;
</code></pre>

<p>Your <code>allowed_domains</code> are wrong. You should use:</p>

<pre><code>allowed_domains = ["maritime-connector.com"]
</code></pre>

<p>The <code>http://</code> does not play a part in the domain.</p>

python scrapy