scrapy / itemloaders

Library to populate items using XPath and CSS with a convenient API
BSD 3-Clause "New" or "Revised" License
45 stars 16 forks source link

Fix selectors raising an error when parameters re is not str #57

Closed VMRuiz closed 2 years ago

VMRuiz commented 2 years ago

re was passed to parsel along with the rest of the parameters to be used as variable in Xpath and Css paths. This was harmless when re was an instance of str but when it wasn't it caused parsel / lxml to raise an error.

With this fix, re is a reserved keyword that can't be used as variable for replacement in Selectors.

Fixes https://github.com/scrapy/itemloaders/issues/56

codecov[bot] commented 2 years ago

Codecov Report

Merging #57 (da3c475) into master (6b4d761) will decrease coverage by 0.00%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #57      +/-   ##
==========================================
- Coverage   99.60%   99.60%   -0.01%     
==========================================
  Files           4        4              
  Lines         255      254       -1     
==========================================
- Hits          254      253       -1     
  Misses          1        1              
Impacted Files Coverage Δ
itemloaders/__init__.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.