<p dir="auto">Currently several dont_... flags don't work as one could expect if their value is False: <code class="notranslate">dont_merge_cookies=False</code> is the same as <code class="notranslate">dont_merge_cookies=True</code> - only the presence of a flag is checked. What about checking actual values?</p>
<p dir="auto">Affected options:</p>
<ul dir="auto">
<li>dont_merge_cookies <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="39855401" data-permission-text="Title is private" data-url="https://github.com/scrapy/scrapy/issues/846" data-hovercard-type="pull_request" data-hovercard-url="/scrapy/scrapy/pull/846/hovercard" href="https://github.com/scrapy/scrapy/pull/846">#846</a></li>
<li>dont_redirect</li>
<li>dont_retry</li>
<li>dont_cache from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="38933169" data-permission-text="Title is private" data-url="https://github.com/scrapy/scrapy/issues/821" data-hovercard-type="pull_request" data-hovercard-url="/scrapy/scrapy/pull/821/hovercard" href="https://github.com/scrapy/scrapy/pull/821">#821</a></li>
</ul>
<p dir="auto">There is also 'dont_filter' argument for Request; it handles False values.</p>
<p dir="auto">Case:<br>
unexpected behavior identified for LinkExctractor with Unique = False if the page contains fully identical links (the same URL and text).<br>
The current result returns one unique link instead of two or more identical ones.<br>
For example:</p>
<ol dir="auto">
<li>Local http file</li>
</ol>
<div class="highlight highlight-text-html-ecmarkup notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;html&gt;
&lt;body&gt;
&lt;a href='sample3.html'&gt;sample 3 repetition&lt;/a&gt;
&lt;a href='sample3.html'&gt;sample 3 repetition&lt;/a&gt;
&lt;/body&gt;
&lt;/html&gt;```

2) Scrapy test code:
ignore the error about &lt;GET file:///robots.txt&gt;  as we use local file

`import scrapy
from scrapy.linkextractors import LinkExtractor

class QuotesSpider(scrapy.Spider):
    name = “test”
    start_urls = [
        'file:///&lt;insert_your_local_path&gt;/Test_file.html',
    ]

def __init__(self, *args, **kwargs):
    super(QuotesSpider, self).__init__(*args, **kwargs)
    self.le = LinkExtractor(unique=False)

def parse(self, response):
    links = self.le.extract_links(response)
    yield {'extract_link': links}`

3) run the code: scrapy crawl test, and get the result with one link:

{'extract_link': [Link(url='file:///&lt;your_local_path&gt;/sample3.html', text='sample 3 repetition', fragment='', nofollow=False)]}

Instead of the result with two links from HTML:

{'extract_link': [Link(url='file:///&lt;your_local_path&gt;/sample3.html', text='sample 3 repetition', fragment='', nofollow=False), 
Link(url='&lt;your_local_path&gt;/sample3.html', text='sample 3 repetition', fragment='', nofollow=False)]}"><pre class="notranslate">&lt;<span class="pl-ent">html</span>&gt;
&lt;<span class="pl-ent">body</span>&gt;
&lt;<span class="pl-ent">a</span> <span class="pl-e">href</span>=<span class="pl-s"><span class="pl-pds">'</span>sample3.html<span class="pl-pds">'</span></span>&gt;sample 3 repetition&lt;/<span class="pl-ent">a</span>&gt;
&lt;<span class="pl-ent">a</span> <span class="pl-e">href</span>=<span class="pl-s"><span class="pl-pds">'</span>sample3.html<span class="pl-pds">'</span></span>&gt;sample 3 repetition&lt;/<span class="pl-ent">a</span>&gt;
&lt;/<span class="pl-ent">body</span>&gt;
&lt;/<span class="pl-ent">html</span>&gt;```

2) Scrapy test code:
ignore the error about &lt;<span class="pl-ent">GET</span> <span class="pl-e">file:</span>///<span class="pl-e">robots.txt</span>&gt;  as we use local file

`import scrapy
from scrapy.linkextractors import LinkExtractor

class QuotesSpider(scrapy.Spider):
    name = “test”
    start_urls = [
        'file:///&lt;<span class="pl-ent">insert</span><span class="pl-e">_your_local_path</span>&gt;/Test_file.html',
    ]

def __init__(self, *args, **kwargs):
    super(QuotesSpider, self).__init__(*args, **kwargs)
    self.le = LinkExtractor(unique=False)

def parse(self, response):
    links = self.le.extract_links(response)
    yield {'extract_link': links}`

3) run the code: scrapy crawl test, and get the result with one link:

{'extract_link': [Link(url='file:///&lt;<span class="pl-ent">your</span><span class="pl-e">_local_path</span>&gt;/sample3.html', text='sample 3 repetition', fragment='', nofollow=False)]}

Instead of the result with two links from HTML:

{'extract_link': [Link(url='file:///&lt;<span class="pl-ent">your</span><span class="pl-e">_local_path</span>&gt;/sample3.html', text='sample 3 repetition', fragment='', nofollow=False), 
Link(url='&lt;<span class="pl-ent">your</span><span class="pl-e">_local_path</span>&gt;/sample3.html', text='sample 3 repetition', fragment='', nofollow=False)]}</pre></div>