Skip to main content

anigamerpy 0.2.3

動畫瘋爬蟲工具

下載

pip install anigamerpy

使用方式

本模組可獲取兩種資料

  • 新番資料

即動畫瘋首頁的所有動畫

from anigamerpy import anime
from loguru import logger

data = anime.Anime().new_anime().data

#0為第一筆資料 1為第二筆資料 以此類推
logger.info(data[0]['name']) #動畫名
logger.info(data[0]['watch_count']) #目前觀看次數
logger.info(data[0]['episode']) #目前集數
logger.info('https://ani.gamer.com.tw/' + data[0]['href']) #動畫連結
logger.info(data[0]['image']) #圖片
  • 搜尋資料

獲取搜尋的結果

from anigamerpy import anime
from loguru import logger

data = anime.Anime().search_anime(keyword='bang dream').data #需加入搜尋關鍵字 請使用字串來搜尋

#0為第一筆資料 1為第二筆資料 以此類推
logger.info(data[0]['name']) #動畫名
logger.info(data[0]['watch_count']) #觀看次數
logger.info(data[0]['episode']) #集數
logger.info(str(data[0]['years'])[3:]) #年分
logger.info('https://ani.gamer.com.tw/' + data[0]['href']) #動畫連結
logger.info(data[0]['image']) #圖片
logger.info(data[0]['tags']) #標籤
  • 所有動畫

動畫瘋內的所有動畫 參數ID請參考此Json檔

from anigamerpy import anime
from loguru import logger

'''
[ 參數 ]
all_anime()內含有許多參數,以下說明各個參數的功能:
1.tags 動畫屬性 需為list list內需為整數ID且最多五項
2.category 動畫類型 需為整數ID
3.target 動畫對象 需為整數ID
4.sort 排列方式 需為整數ID (空值或1為依年份排列 2為依月人氣排序)
5.page 頁數 需為整數 空值為第一頁
[ 提示 ]
1.all_anime()內若為空,則返回所有動畫標籤內第一頁之內容
2.參數可以不用全部都使用,可僅使用其中幾個
3.以上參數若某項為空則代表顯示該頁籤之全部結果
'''
data = anime.Anime().all_anime().data #請參照上方

#0為第一筆資料 1為第二筆資料 以此類推
logger.info(data[0]['name']) #動畫名
logger.info(data[0]['watch_count']) #觀看次數
logger.info(data[0]['episode']) #集數
logger.info(str(data[0]['years'])[3:]) #年分
logger.info('https://ani.gamer.com.tw/' + data[0]['href']) #動畫連結
logger.info(data[0]['image']) #圖片
logger.info(data[0]['tags']) #標籤

其他

若有發現任何bug或是問題,請開issue

License

本專案使用 MIT LICENSE

MIT © Sakuya0502

Release files for anigamerpy 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for anigamerpy 0.2.3
File Size Uploaded
anigamerpy-0.2.3.tar.gz 6.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for anigamerpy 0.2.3
File Interpreter ABI Platform
anigamerpy-0.2.3-py3-none-any.whl Python 3 none any Details

Total release size:15.0 kB

Release files / anigamerpy-0.2.3.tar.gz

Download URL anigamerpy-0.2.3.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
df25be754a0f0bc93bbe618d435932e3226912f8b8dea6750f978f89a5c47937
BLAKE2b-256 checksum
How to use checksums
57ab1e1d813fdc35e5487632811155b20ecaf11d8462d6d7639590da7c19790b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.6

Release files / anigamerpy-0.2.3-py3-none-any.whl

Download URL anigamerpy-0.2.3-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bdf5ab35b9346c387fa1bac2817690241351631d1bc8db7e1f6e9700e1f7e68d
BLAKE2b-256 checksum
How to use checksums
2b179e75fab79cace9e29271fc07bf491e544c0e5670ed5944314b75c96e12bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page