Scrapy, a fast high-level web crawling & scraping framework for Python.
FormRequest: fix unicode xpath exception
Νικόλαος-Διγενής Καραγιάννης4f98be60be70
diff --git a/scrapy/http/request/form.py b/scrapy/http/request/form.pyindex 8ff394602..948ad05c9 100644--- a/scrapy/http/request/form.py+++ b/scrapy/http/request/form.py@@ -85,7 +85,8 @@ def _get_form(response, formname, formid, formnumber, formxpath):el = el.getparent()if el is None:break- raise ValueError('No <form> element found with %s' % formxpath)+ encoded = formxpath if six.PY3 else formxpath.encode('unicode_escape')+ raise ValueError('No <form> element found with %s' % encoded)# If we get here, it means that either formname was None# or invalid