python csdn_Python制作CSDN免积分下载器

使用Python编写的CSDN资源下载工具,无需积分即可下载。用户输入资源地址和验证码,程序通过模拟登录获取下载链接,成功率约70-80%。源代码包括UI界面和HTTP请求操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

CSDN免积分下载 你懂的。

1、输入资源地址如:http://download.csdn.net/download/gengqkun/4127808

2、输入验证码

3、点击下载,会弹出浏览器下载。

注:成功率在70-80% ,界面很丑,请将就着用。

#-*-coding:utf-8-*-

#python3.3.5

import urllib.parse,urllib.request,http.cookiejar,io,webbrowser

import tkinter as tk

from tkinter import *

from tkinter.ttk import *

from urllib.request import urlopen

from PIL import Image, ImageTk

global root

#设置cookie

cookie = http.cookiejar.CookieJar()

cookieProc = urllib.request.HTTPCookieProcessor(cookie)

opener = urllib.request.build_opener(cookieProc)

urllib.request.install_opener(opener)

#根据路径和POST内容来提交表单

def getUrlRequest(iUrl,iStrPostData):

postdata = urllib.parse.urlencode(iStrPostData)

postdata = postdata.encode(encoding='UTF8')

header = {'User-Agent':'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)'}

req= urllib.request.Requ

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值