I'm trying to request a URL with data encoded in base64 on it, like so:
http://www.somepage.com/es_e/bla_bla#eyJkYXRhIjp7ImNvdW50cnlJZCI6IkVTIiwicmVnaW9uSWQiOiI5MjAiLCJkdXJhdGlvbiI6NywibWluUGVyc29ucyI6MX0sImNvbmZpZyI6eyJwYWdlIjoiMCJ9fQ==
What I do, is build a JSON object, encode it into base64, and append it to a url like this:
new_data = {"data": {"countryId": "ES", "regionId": "920", "duration": 7, "minPersons": 1}, "config": {"page": 2}}
json_data = json.dumps(new_data)
new_url = "http://www.somepage.com/es_es/bla_bla#" + base64.b64encode(json_data)
yield scrapy.Request(url=new_url, callback=self.parse)
The problem is that Scrapy crawls only this part of the URL http://www.somepage.com/es_es/bla_bla
without the data encoded and appended to it...however, if I paste the new_url
into the browser, it shows me the result I want with the data encoded!
Don't know what's happening...Can anyone give me a hand?