Skip to content

Commit f05c870

Browse files
authored
Merge pull request #164 from whalebot-helmsman/master
use a copy instead of changing external dict
2 parents 857f549 + 6658431 commit f05c870

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scrapy_splash/request.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
from __future__ import absolute_import
3+
import copy
34
import scrapy
45
from scrapy.http import FormRequest
56

@@ -40,7 +41,7 @@ def __init__(self,
4041
url = 'about:blank'
4142
url = to_native_str(url)
4243

43-
meta = meta or {}
44+
meta = copy.deepcopy(meta) or {}
4445
splash_meta = meta.setdefault('splash', {})
4546
splash_meta.setdefault('endpoint', endpoint)
4647
splash_meta.setdefault('slot_policy', slot_policy)

0 commit comments

Comments
 (0)