Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Updated CAMELCASE_EXCLUDE_CHARS to also exclude digits (patch by Adam Wentz)

Pablo Hoffmanab9b786791dc
diff --git a/scrapy/utils/template.py b/scrapy/utils/template.py
index 7c1946638..19ad64809 100644
--- a/scrapy/utils/template.py
+++ b/scrapy/utils/template.py
@@ -16,7 +16,7 @@ def render_templatefile(path, **kwargs):
if path.endswith('.tmpl'):
os.remove(path)
-CAMELCASE_INVALID_CHARS = re.compile('[^a-zA-Z]')
+CAMELCASE_INVALID_CHARS = re.compile('[^a-zA-Z\d]')
def string_camelcase(string):
""" Convert a word to its CamelCase version and remove invalid chars