Scrapy, hash tag on URLs

后端 未结 3 900
半阙折子戏
半阙折子戏 2020-12-21 05:10

I\'m on the middle of a scrapping project using Scrapy.

I realized that Scrapy strips the URL from a hash tag to the end.

Here\'s the output from the shell:<

3条回答
  •  隐瞒了意图╮
    2020-12-21 06:06

    Looks like it's not possible. The problem is not the response, it's in the request, which chops the url.

    It is retrievable from Javascript - as window.location.hash. From there you could send it to the server with Ajax for example, or encode it and put it into URLs which can then be passed through to the server-side.

    Can I read the hash portion of the URL on my server-side application (PHP, Ruby, Python, etc.)?

    Why do you need this part which is stripped if the server doesn't receive it from browser? If you are working with Amazon - i haven't seen any problems with such urls.

提交回复
热议问题