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
ChenJinluo
V2EX  ›  Python

Python 爬虫萌新遇到一个问题 0.0?求助

  •  
  •   ChenJinluo · 2018-01-03 21:29:06 +08:00 · 1718 次点击
    这是一个创建于 2275 天前的主题,其中的信息可能已经有所发展或是发生改变。
    Python 爬虫新手一枚,想试试爬电影天堂的某个页面的电影下载链接,结果遇到个问题。由于我是新加入的连图片链接都发不了,所以我在知乎上提了问: https://www.zhihu.com/question/265036906
    Liyuu
        1
    Liyuu  
       2018-01-04 05:33:16 +08:00
    这个迅雷连接就是那个 ftp 连接用 base64 转换一下,其实不用抓。你用你抓到的 ftp 连接转换就行,以下是转换方法:
    '''
    import base64
    ftp_link = 'ftp://ygdy8:[email protected]:7082/[阳光电影 www.ygdy8.net].全球风暴.HD.720p.韩版中英双字幕.rmvb'

    link = 'AA' + ftp_link + 'ZZ'
    link = base64.b64encode(link.encode("utf-8"))
    link = 'thunder://' + link.decode("utf-8")
    print (link)

    '''
    Liyuu
        2
    Liyuu  
       2018-01-04 05:38:27 +08:00   ❤️ 1
    不知道怎么插代码,试一下
    <script src="https://gist.github.com/liyuuuu/fa6492fb33b74632898ab793f1c27f1e.js"></script>
    ChenJinluo
        3
    ChenJinluo  
    OP
       2018-01-04 12:12:34 +08:00
    @Liyuu 非常感谢!
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5281 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 09:34 · PVG 17:34 · LAX 02:34 · JFK 05:34
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.