• cookie转换成字典类型方便scraoy 使用


    #bakooie装换成紫电模式方便scrapy使用
    cookid = "_ga=GA1.2.1937936278.1538889470; __gads=ID=1ba11c2610acf504:T=1539160131:S=ALNI_MZwhotFaAA6KsIVzHG-ev0RnU4OIQ; .CNBlogsCookie=7F3B19F5204038FAE6287F33828591011A60086D0F4349BEDA5F568571875F43E1EED5EDE24E458FAB8972604B4ECD19FC058F5562321A6D87ABF8AAC19F32EC6C004B2EBA69A29B8532E5464ECD145896AA49F1; .Cnblogs.AspNetCore.Cookies=CfDJ8J0rgDI0eRtJkfTEZKR_e81dD8ABr7voOOlhOqLJ7tzHG0h7wCeF8EYzLUZbtYueLnkUIzSWDE9LuJ-53nA6Lem4htKEIqdoOszI5xWb4PUZHJtM1qgEjI1E1Q8YLz8cU3jts5xoHMzq7qq7AmtrlCYYqvBMgEX8GACn8j61WrxZfKe9Hmh4akC9AxcODmAPP--axDI0w6LTSQYKl4GnKihmxM6DQ3RDCXXzWukG-3xiPfKv5vdSNFBTvj7b2qOeTmy45RWkQT9dqf_bXjniWnhPHRnGq8uNHqN2bpzUlCOxsrjwuZlhbAPPLCnX90XJaA; _gid=GA1.2.201165281.1540104585"
    coolies = dict(i.split('=',1) for i in cookid.split(';'))
    print(coolies)

     

    --------------------- 
    作者:诸葛亮
    来源:博客园
    原文:https://www.cnblogs.com/gaosai/
    版权声明:本文为博主原创文章,转载请附上博文链接!
  • 相关阅读:
    爬虫杂七杂八
    pycharm使用技巧
    python杂七杂八
    mysql杂七杂八
    mysql常见函数总结:
    CF1030F Putting Boxes Together
    AT2688 [ARC080C] Young Maids
    P5280 [ZJOI2019]线段树
    雨的味道
    P2572 [SCOI2010]序列操作
  • 原文地址:https://www.cnblogs.com/gaosai/p/9825466.html
Copyright © 2020-2023  润新知