Skip to content

Commit

Permalink
use a copy instead of changing external dict
Browse files Browse the repository at this point in the history
  • Loading branch information
whalebot-helmsman committed Feb 2, 2018
1 parent 857f549 commit 6658431
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 6658431

Please sign in to comment.