Giter Site home page Giter Site logo

unabuse / elegant_finder Goto Github PK

View Code? Open in Web Editor NEW
50.0 1.0 7.0 476 KB

一位爬虫爱好者的仓库,最新维护时间2024/1/15,目前支持:BiliBili视频下载、番茄小说、国内Pixivel多线程下载、python代理收集。

Home Page: https://unabuse.github.io/Elegant_finder/

License: MIT License

Python 100.00%
python3 http-proxy proxy novel

elegant_finder's Introduction

Elegant_finder

目录

Change Log

v0.1.4 (2024/1/15)

  • 修正了FanQieNovel中许多未解决的问题

v0.1.3 (2023/3/17)

  • meth.py兼容性增强, 采用更优雅的方式

v0.1.2 (2023/3/13)

  • meth.py兼容3.10以下不支持match-case语句版本

v0.1.1 (2023/1/31)

  • Bilibili.reptile新增Cookie及多线程下载
  • meth.py增加支持大文件下载

v0.1.0 (2023/1/30)

  • 更正目录结构,增加可读性
  • 新增Pixivel.reptile, Bilibili.reptile
  • 优化FanQie.Novel.reptile结构
  • 重构代理爬取Proxy.reptile
  • python版本需要3.10+来支持match-case语句

成品展示

BiliBili视频下载器v2.1

这是通过Bilibili.reptile做出来的一个成品, 下面的fix_m4s算是针对电脑客户端下载的情况.

下载地址: releases/tag/v2.1
通过pyside6进行开发, 关于m3u8的直播录制暂时没有实现.
pyside6实现方法
最新通过inno setup进行二次封装.
支持扫码登录, 优化了多线程下载的思路. 后面改进好了会开源供大家参考.

图片1 图片2

FanQieNovel

详情

其他爬虫

整理灵感,多久更新我也不知道,感觉自己在写一些过时的东西

LICENSE

MIT

elegant_finder's People

Contributors

unabuse avatar cauchyxb avatar

Stargazers

Rn_reck avatar hPingz avatar  avatar dydhyh avatar  avatar  avatar 逸轩 avatar  avatar  avatar  avatar BelovedChunh avatar SiXiang avatar  avatar  avatar  avatar 周上行Ryer avatar BsKPLu avatar  avatar Qingqin Lu avatar  avatar  avatar Bernie avatar 憨憨 avatar  avatar  avatar Nilou avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar EsperantoPersono avatar  avatar roshanli avatar Lin Fei avatar  avatar  avatar  avatar  avatar chaojie-fu avatar 亦木永 avatar Z_Eternity avatar sanmmmm avatar Lingo avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

elegant_finder's Issues

fanqie获取正文出错

fanqie.content("7199293958260785698") 返回null 应该是番茄改正文链接了,麻烦有时间修复一下,感谢!

您好,运行FanQieNovelReptile.py出现问题

File "C:\Users\ainil\Desktop\reptile.inclued-main\reptile\FanQieNovelReptile.py", line 8, in
from reptile.packet import *
ModuleNotFoundError: No module named 'reptile.packet'
已使用pip 安装 reptile 这个包
问题仍然出现

请求商务推广合作

作者您好,我们也是一家专业做IP代理的服务商,极速HTTP,我们注册认证会送10000IP(可以帮助您的学者适当薅羊毛试用 :) 。想跟您谈谈是否能够达成商业推广上的合作。如果您,有意愿的话,可以联系我,微信:13982004324 谢谢(如果没有意愿的话,抱歉,打扰了)

请问一下python程序是怎么使用的?

我配置完python环境了,也把依赖库安装了,但是那个范例怎么用?是在终端输命令吗?
FanQieNovel
没有反应是为什么?py小白,还请多多指教。
image

番茄小说爬虫出错

direct返回的是目录的list,但是只有item_id,没有其他的title之类的信息。
content返回报错,提示cookie有问题。
不知道能不能出一个示范代码,讲解得更详细一点

关于fanqieapi

文档中给定信息太少,并且使用有bug,python 3.9版本下运行app报错
def search(self, keywords: str) -> list | str: TypeError: unsupported operand type(s) for |: 'type' and 'type'

通过修改成功运行,但是运行并没有返回任何信息就结束

修改后的代码

from typing import List, Optional

# -*- encoding: utf-8 -*-
# verified time: 2024/2/12

from config import *
from requests import Session

class FanQie:
    def __init__(self) -> None:
        # 初始化函数,定义基本参数
        super().__init__()  # 调用父类的初始化函数
        self.session = Session()  # 创建一个Session对象,并赋值给self.session

    def search(self, keywords: str) -> Optional[List[dict]]:
        """
        搜索书籍信息

        参数:
        keywords (str): 关键字

        返回:
        list: 书籍信息列表
        """
        # 获得书本基本信息
        params = {
            'aid': 1967,
            'q': keywords
        }
        book_list_info = self.session.get(search_url, params=params, headers=headers).json()
        return 'ret_data' in book_list_info.keys() and book_list_info['data']['ret_data'] or '未配置cookie或者cookie失效'

    def direct(self, book_id: str) -> Optional[List[dict]]:
        # 获取书本目录
        params = {
            'book_id': book_id,  # 书本ID
            'device_platform': 'android',  # 设备平台
            'version_code': 600,  # 版本码
            'novel_version': None,  # 小说版本
            'app_name': 'news_article',  # 应用名称
            'version_name': '6.0.0',  # 应用版本名
            'app_version': '6.0.0aid=520',  # 应用版本号
            'channel': '1',  # 渠道
            'device_type': 'landseer',  # 设备类型
            'os_api': '25',  # 操作系统API
            'os_version': '10',  # 操作系统版本
        }
        direc_list_info = self.session.get(directory_url, params=params, headers=headers).json()
        return 'item_list' in direc_list_info['data'].keys() and direc_list_info['data']['item_list'] or '未配置cookie或者cookie失效'

    def content(self, item_id: str) -> str:
        """
        获取当前章节正文内容

        Args:
            item_id (str): 章节ID

        Returns:
            str: 章节正文内容

        Raises:
            str: '未配置cookie或者cookie失效'
        """
        # 定义参数
        params = {
            'aid': 2329,
            'item_id': item_id
        }
        # 发送GET请求并解析响应内容为JSON格式
        content_info = self.session.get(content_url, params=params, headers=headers).json()
            # 返回章节正文内容
        return 'content' in content_info['data'].keys() and content_info['data']['content'] or '未配置cookie或者cookie失效'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.