Skip to content

Commit

Permalink
Merge pull request #164 from whalebot-helmsman/master
Browse files Browse the repository at this point in the history
use a copy instead of changing external dict
  • Loading branch information
kmike committed Feb 2, 2018
2 parents 857f549 + 6658431 commit f05c870
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scrapy_splash/request.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import copy
import scrapy
from scrapy.http import FormRequest

Expand Down Expand Up @@ -40,7 +41,7 @@ def __init__(self,
url = 'about:blank'
url = to_native_str(url)

meta = meta or {}
meta = copy.deepcopy(meta) or {}
splash_meta = meta.setdefault('splash', {})
splash_meta.setdefault('endpoint', endpoint)
splash_meta.setdefault('slot_policy', slot_policy)
Expand Down

0 comments on commit f05c870

Please sign in to comment.