Skip to main content

動畫瘋爬蟲工具

Project description

anigamerpy 0.2.1

動畫瘋爬蟲工具

下載

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.1.tar.gz (3.3 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.1-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: anigamerpy-0.2.1.tar.gz
  • Upload date:
  • Size: 3.3 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.1.tar.gz
Algorithm Hash digest
SHA256 411abb723a2c24b746f27c3cb4fa484990e15fbf1529c48b39ebc7c701060514
MD5 8e1ecaa3dc055ed917b515f93dc0bd74
BLAKE2b-256 dbf2e5eb96a069de201458ccb2a2bf147a2ac5bbf33559b052e1e58db62d79b8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: anigamerpy-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 3.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f81781c2de4aa3f05c6fccb5c1b3f48a4e16f40ffe565c212b21a818859f9911
MD5 252728499438488fab203714bf1d57d4
BLAKE2b-256 b1f80dc084b29ffd7e750ba07e21c643e2eecc176d08cda6b7073c015d64eef8

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