有冇快啲嘅方法可以 backup 得哂尊子明報啲漫畫圖

85 回覆
95 Like 5 Dislike
2023-05-14 14:56:41
2023-05-14 15:06:42
1. Inspect 吓啲 html, 睇吓張圖嘅 URL 喺邊度
2. 用script grep 返條 URL 出嚟 (唔識可以望吓 https://blog.gtwang.org/programming/python-beautiful-soup-module-scrape-web-pages-tutorial/)
3. download and save 返張圖
2023-05-14 15:19:53
屌你原來扮it 佬

咁簡單既野都問
2023-05-14 15:53:04
我幾時有話過自己係 IT 佬
2023-05-14 17:36:59
push
2023-05-14 18:03:34
表面上個網去到第 50 頁就無
實際最盡去到 126 頁
https://life.mingpao.com/general/archive2?tag=comic&page=126
2023-05-14 18:04:10
除咗backup落自己部機,仲可以用
http://web.archive.org/save 同埋 https://archive.today/
2023-05-14 18:08:14
2023-05-14 18:51:12
2023-05-14 19:15:59
留名系統啟動,請勿負評干擾操作



2023-05-14 20:08:51
2023-05-14 21:18:50
2023-05-14 21:24:17
要用海外明報網,美加嗰啲可以免費睇
2023-05-14 21:27:33
2023-05-14 21:30:22
有冇 link
2023-05-14 22:02:29
明報加東網
我都係有時見到有啲文要 subscribe 先可以睇落去,就會張個title google search 明報加拿大版,就可以成篇免費睇到。唔知係咪全部都係
2023-05-14 22:08:33
import requests
from bs4 import BeautifulSoup
from urllib.parse import urljoin
import os

SAVE_FOLDER_PATH = '~/Downloads/mingpao_images/'

def download_images(url):
response = requests.get(url)
soup = BeautifulSoup(response.content, 'html.parser')
images = soup.find_all('img')
for image in images:
src_url = urljoin('https://life.mingpao.com', image['src'])
image_name = src_url.split('/')[-1]
with open(os.path.join(SAVE_FOLDER_PATH, image_name), 'wb') as f:
f.write(requests.get(src_url).content)

if __name__ == '__main__':
base_url = 'https://life.mingpao.com/general/archive2?tag=comic&page='
total_pages = 50

if not os.path.exists(SAVE_FOLDER_PATH):
os.makedirs(SAVE_FOLDER_PATH)

for i in range(1, total_pages+1):
url = base_url + str(i)
download_images(url)
2023-05-14 22:40:59
2023-05-14 22:44:30
2023-05-14 23:08:45
黎明
2023-05-14 23:11:10
2023-05-14 23:55:51
2023-05-15 00:20:18
[Backup教學] 用WinHTTrack backup
https://lihkg.com/thread/2825856/page/1
2023-05-15 00:34:43
巴打你做緊呢件事非常偉大
如果攰我呢個留言會為你打氣
吹水台自選台熱 門最 新手機台時事台政事台World體育台娛樂台動漫台Apps台遊戲台影視台講故台健康台感情台家庭台潮流台美容台上班台財經台房屋台飲食台旅遊台學術台校園台汽車台音樂台創意台硬件台電器台攝影台玩具台寵物台軟件台活動台電訊台直播台站務台黑 洞