banner
andrewji8

Being towards death

Heed not to the tree-rustling and leaf-lashing rain, Why not stroll along, whistle and sing under its rein. Lighter and better suited than horses are straw sandals and a bamboo staff, Who's afraid? A palm-leaf plaited cape provides enough to misty weather in life sustain. A thorny spring breeze sobers up the spirit, I feel a slight chill, The setting sun over the mountain offers greetings still. Looking back over the bleak passage survived, The return in time Shall not be affected by windswept rain or shine.
telegram
twitter
github

Pythonで映画天国のすべての映画のマグネットリンクを取得する

今日は mechanicalsoup を使用して映画天堂(https://www.dytt.to)から映画名、映画、およびマグネットリンクを取得する例を紹介します。

import mechanicalsoup
from urllib.parse import urljoin, unquote
#Browserオブジェクトを作成
browser = mechanicalsoup.Browser()
#映画天堂の欧米映画にアクセス
url = "https://www.dytt.to/html/gndy/oumei/"
page = browser.get(url)
#映画名を取得
links = page.soup.select(".ulink")
for link in links:
    text = link.text.strip()
    #リンクを取得
    href = link.get("href")
    full_url = urljoin(url, href)
    #映画リンクにアクセス
    movie_page = browser.get(full_url)
    #<div id="Zoom">タグを取得
    zoom_div = movie_page.soup.find("div", {"id": "Zoom"})
    #zoom_divが存在する場合、<a>タグのhref値を取得
    if zoom_div:
        a_tags = zoom_div.find_all("a")
        for a_tag in a_tags:
            a_href = unquote(a_tag.get("href"))
            print(f"映画名:{text}\nリンク:{full_url}")
            print(f"マグネットダウンロードリンク:{a_href}\n\n")
            print("-----------------")

出力:
映画名:2023 年ドラマスリラー《沼沢王の娘》BD 中英字幕
リンク:https://www.dytt.to/html/gndy/dyzz/20231123/64365.html
マグネットダウンロードリンク:magnet:?xt=urn:btih&dn = 陽光映画 dygod.org. 沼沢王の娘.2023.BD.1080P. 中英字幕.mkv&tr=udp://tracker.opentrackr.org:1337/announce&tr=udp://exodus.desync.com:6969/announce


映画名:2023 年アニメコメディ《トカゲおじさんリオ》BD 中英字幕
リンク:https://www.dytt.to/html/gndy/dyzz/20231123/64363.html
マグネットダウンロードリンク:magnet:?xt=urn:btih:699620e20227fcebbbaac4f6a76988ee59354cc1&dn = 陽光映画 dygod.org. トカゲおじさんリオ.2023.BD.1080P. 中英字幕.mkv&tr=udp://tracker.opentrackr.org:1337/announce&tr=udp://exodus.desync.com:6969/announce


映画名:2023 年アクション《ジョニーとクライド》BD 英語字幕
リンク:https://www.dytt.to/html/gndy/jddy/20231122/64362.html
マグネットダウンロードリンク:magnet:?xt=urn:btih:61b765ce57d2aaa58fccc8ff2b42da9445618a81&dn = 陽光映画 dygod.org. ジョニーとクライド.2023.BD.1080P. 英語字幕.mkv&tr=udp://tracker.opentrackr.org:1337/announce&tr=udp://exodus.desync.com:6969/announce


映画名:2023 年ドラマ《盲証》BD 中英字幕
リンク:https://www.dytt.to/html/gndy/jddy/20231121/64359.html
マグネットダウンロードリンク:magnet:?xt=urn:btih:625c90c6d1b218a338c03ec4b3fea01c3f9fde9a&dn = 陽光映画 dygod.org. 盲証.2023.BD.1080P. 中英字幕.mkv&tr=udp://tracker.opentrackr.org:1337/announce&tr=udp://exodus.desync.com:6969/announce


映画名:2023 年ホラー《エクソシスト:信者》BD 英語字幕
リンク:https://www.dytt.to/html/gndy/jddy/20231120/64357.html
マグネットダウンロードリンク:magnet:?xt=urn:btih&dn = 陽光映画 dygod.org. エクソシスト:信者.2023.BD.1080P. 英語字幕.mkv&tr=udp://tracker.opentrackr.org:1337/announce&tr=udp://exodus.desync.com:6969/announce


映画名:2023 年ドラマスリラー《男気管制》BD 中英字幕
リンク:https://www.dytt.to/html/gndy/jddy/20231119/64356.html
マグネットダウンロードリンク:magnet:?xt=urn:btih:94c703906554074e3e90f9d36d839a75f3845209&dn = 陽光映画 dygod.org. 男気管制.2023.BD.1080P. 中英字幕.mkv&tr=udp://tracker.opentrackr.org:1337/announce&tr=udp://exodus.desync.com:6969/announce


映画名:2023 年ドラマスリラー《男気管制》BD 中英字幕
リンク:https://www.dytt.to/html/gndy/jddy/20231119/64356.html
マグネットダウンロードリンク:magnet:?xt=urn:btih:94c703906554074e3e90f9d36d839a75f3845209&dn = 陽光映画 dygod.org. 男気管制.2023.BD.1080P. 中英字幕.mkv&tr=udp://tracker.opentrackr.org:1337/announce&tr=udp://exodus.desync.com:6969/announce


映画名:2023 年ドラマスリラー《男気管制》BD 中英字幕
リンク:https://www.dytt.to/html/gndy/jddy/20231119/64356.html
マグネットダウンロードリンク:magnet:?xt=urn:btih:94c703906554074e3e90f9d36d839a75f3845209&dn = 陽光映画 dygod.org. 男気管制.2023.BD.1080P. 中英字幕.mkv&tr=udp://tracker.opentrackr.org:1337/announce&tr=udp://exodus.desync.com:6969/announce

読み込み中...
文章は、創作者によって署名され、ブロックチェーンに安全に保存されています。