Hi, experts!
I have issue in form submiting using requests.
This is the scrapy function
yield FormRequest.from_response(response, formxpath=sub_category_form_xpath, formdata=sub_category_submit_form_data, callback=self.parse_product_page, meta=meta, dont_filter=True)```
This work perfectely for me.
But I must implement using requests, not scrapy func.
So my requests code is
``` python
session = requests.Session()
user_agent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36"
headers = {
'Accept-Language': 'en-US,en;q=0.9',
"Referer": response.url,
"User-Agent": user_agent,
"Origin": "https://b2b.hanro.com",
}
sub_cat_res = session.post(response.url, data=sub_category_submit_form_data, headers=headers)```
This also work well, but unexpected result is responsed(I got errro page content).
What is the my issue?
I look forward to hearing from you.
Regards!