V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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
wchluxi
V2EX  ›  Python

Python imbox 如何获取指定日期的邮件?

  •  
  •   wchluxi · 2021-12-22 10:37:08 +08:00 · 1847 次点击
    这是一个创建于 849 天前的主题,其中的信息可能已经有所发展或是发生改变。
    imbox.messages(date__on=)
    

    date__on不生效,都是推送最近三十天,有大神教教怎么解决吗?

    4 条回复    2021-12-22 11:37:14 +08:00
    2i2Re2PLMaDnghL
        1
    2i2Re2PLMaDnghL  
       2021-12-22 10:58:34 +08:00
    看上去 imbox 是把 date__on 直接作为 (ON "2006-01-02") 传递给了服务器,没有作手动筛选
    先问下你,你 date__on 传了啥?
    wchluxi
        2
    wchluxi  
    OP
       2021-12-22 11:04:56 +08:00
    @2i2Re2PLMaDnghL 我就穿今天日期它也是返回很多天的邮件给我 imbox.messages(date__on=datetime.date(2021,12,22))
    2i2Re2PLMaDnghL
        3
    2i2Re2PLMaDnghL  
       2021-12-22 11:15:40 +08:00   ❤️ 1
    感觉有可能是服务器的 IMAP 实现有问题(毕竟 ON 看上去用的人少),考虑 1. 抓包?; 2. 用其他 IMAP 客户端发 ON query ; 3. 组合使用 date__lt date__gt 替代
    wchluxi
        4
    wchluxi  
    OP
       2021-12-22 11:37:14 +08:00
    @2i2Re2PLMaDnghL 确实是服务器的 IMAP 实现有问题,换了个服务器就可以了,谢谢!
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1021 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 217ms · UTC 19:24 · PVG 03:24 · LAX 12:24 · JFK 15:24
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.