Skip to main content

動畫瘋爬蟲工具

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

anigamerpy-0.2.3.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

anigamerpy-0.2.3-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file anigamerpy-0.2.3.tar.gz.

File metadata

  • Download URL: anigamerpy-0.2.3.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for anigamerpy-0.2.3.tar.gz
Algorithm Hash digest
SHA256 df25be754a0f0bc93bbe618d435932e3226912f8b8dea6750f978f89a5c47937
MD5 6d317ce7111f22005f3718c5af99e935
BLAKE2b-256 57ab1e1d813fdc35e5487632811155b20ecaf11d8462d6d7639590da7c19790b

See more details on using hashes here.

File details

Details for the file anigamerpy-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: anigamerpy-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for anigamerpy-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bdf5ab35b9346c387fa1bac2817690241351631d1bc8db7e1f6e9700e1f7e68d
MD5 78df1fc69e67df0d4a477bc1c9ec8067
BLAKE2b-256 2b179e75fab79cace9e29271fc07bf491e544c0e5670ed5944314b75c96e12bb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page