推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
MrhuangSTR
V2EX  ›  Python

猫眼电影切换城市地址栏和请求参数都没有城市信息

  •  
  •   MrhuangSTR · Aug 21, 2020 · 2574 views
    This topic created in 2090 days ago, the information mentioned may be changed or developed.

    rt,打开 chrome 控制台,点击猫眼电影切换城市,这个请求 https://maoyan.com/ 中看到“正在热映”这个数据是变化的,却找不到城市的参数信息,如果想要获取不同城市的数据就不能构造请求的方式获取了,请问这是怎么做到的。

    9 replies    2020-08-21 17:27:55 +08:00
    kiracyan
        1
    kiracyan  
       Aug 21, 2020
    定位
    MrhuangSTR
        2
    MrhuangSTR  
    OP
       Aug 21, 2020
    那如果要抓取的话该怎么解决呢
    MrhuangSTR
        3
    MrhuangSTR  
    OP
       Aug 21, 2020
    @kiracyan 那如果要抓取的话该怎么解决呢
    lawsiki
        4
    lawsiki  
       Aug 21, 2020
    cookie 中的 recentCis 参数
    MrhuangSTR
        5
    MrhuangSTR  
    OP
       Aug 21, 2020
    @lawsiki recentCis=1%3D59%3D45%3D20%3D70 这玩意解码出来:1=59=45=20=70 ;这跟地市地区 id 有什么关联吗?
    lawsiki
        6
    lawsiki  
       Aug 21, 2020
    @MrhuangSTR #5 这个就是最近访问的城市,每个数字就是城市 id,查看 dom 可以看到每个城市的 id
    MrhuangSTR
        7
    MrhuangSTR  
    OP
       Aug 21, 2020
    @lawsiki 确实是跟 cookies 有关,这个参数没毛病,但是不是关键参数啊。。我试了下把整段 cookies 加进去,该字段不是必须字段
    journey0ad
        8
    journey0ad  
       Aug 21, 2020
    cookie ci 字段
    journey0ad
        9
    journey0ad  
       Aug 21, 2020
    看名字内容看不出来作用就挨个删除刷新看效果
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   929 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 20:46 · PVG 04:46 · LAX 13:46 · JFK 16:46
    ♥ Do have faith in what you're doing.