from pathlib import Path p=Path("/mnt/data/FF_Foto_de_Parede.html") s=p.read_text(encoding="utf-8") # Replace the category/photo data array with a much larger set of categories and images. start=s.index("const data=[") end=s.index("];\nlet currentCategory", start)+2 data=r'''const data=[ ["Anime","https://images.unsplash.com/photo-1578632767115-351597cf2477?auto=format&fit=crop&w=500&q=80"], ["Mulheres Bonitas","https://images.unsplash.com/photo-1534528741775-53994a69daeb?auto=format&fit=crop&w=500&q=80"], ["Terror","https://images.unsplash.com/photo-1509248961158-e54f6934749c?auto=format&fit=crop&w=500&q=80"], ["Cavaleiros","https://images.unsplash.com/photo-1518709268805-4e9042af9f23?auto=format&fit=crop&w=500&q=80"], ["Carros","https://images.unsplash.com/photo-1503376780353-7e6692767b70?auto=format&fit=crop&w=500&q=80"], ["Natureza","https://images.unsplash.com/photo-1470770841072-f978cf4d019e?auto=format&fit=crop&w=500&q=80"], ["Animais","https://images.unsplash.com/photo-1546182990-dffeafbe841d?auto=format&fit=crop&w=500&q=80"], ["Cidades","https://images.unsplash.com/photo-1519608487953-e999c86e7455?auto=format&fit=crop&w=500&q=80"], ["Espaço","https://images.unsplash.com/photo-1446776811953-b23d57bd21aa?auto=format&fit=crop&w=500&q=80"], ["Amor","https://images.unsplash.com/photo-1518199266791-5375a83190b7?auto=format&fit=crop&w=500&q=80"], ["Moda","https://images.unsplash.com/photo-1483985988355-763728e1935b?auto=format&fit=crop&w=500&q=80"], ["Wallpapers","https://images.unsplash.com/photo-1497250681960-ef046c08a56e?auto=format&fit=crop&w=500&q=80"], ["Futebol","https://images.unsplash.com/photo-1574629810360-7efbbe195018?auto=format&fit=crop&w=500&q=80"], ["Super-heróis","https://images.unsplash.com/photo-1531259683007-016a7b628fc3?auto=format&fit=crop&w=500&q=80"], ["Jogos","https://images.unsplash.com/photo-1542751371-adc38448a05e?auto=format&fit=crop&w=500&q=80"], ["Pôr do sol","https://images.unsplash.com/photo-1472120435266-53107fd0c44a?auto=format&fit=crop&w=500&q=80"], ["Flores","https://images.unsplash.com/photo-1490750967868-88aa4486c946?auto=format&fit=crop&w=500&q=80"], ["Praias","https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=500&q=80"], ["Arquitetura","https://images.unsplash.com/photo-1487958449943-2429e8be8625?auto=format&fit=crop&w=500&q=80"], ["Fantasia","https://images.unsplash.com/photo-1518709268805-4e9042af9f23?auto=format&fit=crop&w=500&q=80"], ["Motos","https://images.unsplash.com/photo-1558981806-ec527fa84c39?auto=format&fit=crop&w=500&q=80"], ["Comida","https://images.unsplash.com/photo-150467 keluar?auto=format&fit=crop&w=500&q=80"], ["Música","https://images.unsplash.com/photo-1516280440614-37939bbacd81?auto=format&fit=crop&w=500&q=80"], ["Desporto","https://images.unsplash.com/photo-1461896836934-ffe607ba8211?auto=format&fit=crop&w=500&q=80"], ["Minimalista","https://images.unsplash.com/photo-1494438639946-1ebd1d20bf85?auto=format&fit=crop&w=500&q=80"], ["Tecnologia","https://images.unsplash.com/photo-1518770660439-4636190af475?auto=format&fit=crop&w=500&q=80"], ["Engraçadas","https://images.unsplash.com/photo-1531123897727-8f129e1688ce?auto=format&fit=crop&w=500&q=80"], ["Motivação","https://images.unsplash.com/photo-1500534623283-312aade485b7?auto=format&fit=crop&w=500&q=80"], ["Frases inspiradoras","https://images.unsplash.com/photo-1455390582262-044c09d366e2?auto=format&fit=crop&w=500&q=80"], ["Paisagens","https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?auto=format&fit=crop&w=500&q=80"], ["Aves","https://images.unsplash.com/photo-1444464666168-49d633b86797?auto=format&fit=crop&w=500&q=80"], ["Cães","https://images.unsplash.com/photo-1552053831-71594a27632d?auto=format&fit=crop&w=500&q=80"], ["Gatos","https://images.unsplash.com/photo-1514888286974-6c03e2ca1dba?auto=format&fit=crop&w=500&q=80"], ["Luxo","https://images.unsplash.com/photo-1511818966892-d7d671e672a2?auto=format&fit=crop&w=500&q=80"], ["Religião e paz","https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=500&q=80"], ["Casais","https://images.unsplash.com/photo-1522673607200-164d1b6ce486?auto=format&fit=crop&w=500&q=80"], ["Viagens","https://images.unsplash.com/photo-148864当?auto=format&fit=crop&w=500&q=80"], ["Mar","https://images.unsplash.com/photo-1518837695005-2083093ee35b?auto=format&fit=crop&w=500&q=80"], ["Inverno","https://images.unsplash.com/photo-1418985991508-e47386d96a71?auto=format&fit=crop&w=500&q=80"], ["Primavera","https://images.unsplash.com/photo-1490750967868-88aa4486c946?auto=format&fit=crop&w=500&q=80"], ["Desenhos e arte","https://images.unsplash.com/photo-1541961017774-22349e4a1262?auto=format&fit=crop&w=500&q=80"], ["Carros desportivos","https://images.unsplash.com/photo-1492144534655-ae79c964c9d7?auto=format&fit=crop&w=500&q=80"], ["Aeronaves","https://images.unsplash.com/photo-1436491865332-7a61a109cc05?auto=format&fit=crop&w=500&q=80"], ["Maravilhas do mundo","https://images.unsplash.com/photo-1533105079780-92b9be482077?auto=format&fit=crop&w=500&q=80"], ["Neon","https://images.unsplash.com/photo-1519608487953-e999c86e7455?auto=format&fit=crop&w=500&q=80"], ["Padrões e texturas","https://images.unsplash.com/photo-1557682250-33bd709cbe85?auto=format&fit=crop&w=500&q=80"], ["Bebés e família","https://images.unsplash.com/photo-1511895426328-dc8714191300?auto=format&fit=crop&w=500&q=80"], ["Riqueza e negócios","https://images.unsplash.com/photo-1460925895917-afdab827c52f?auto=format&fit=crop&w=500&q=80"], ["Espiritualidade","https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=500&q=80"], ["Outono","https://images.unsplash.com/photo-1507371341162-763b5e419408?auto=format&fit=crop&w=500&q=80"] ]''' s=s[:start]+data+s[end:] # Make all categories browsable in tiles, rather than showing only the first nine. s=s.replace('data.slice(0,9).map(x=>', 'data.map(x=>') # Improve package dialog and explain pending payment; avoid falsely claiming automatic verification. s=s.replace('
Esta demonstração não verifica transações nem liberta downloads automaticamente.
', '''Esta demonstração não consegue verificar automaticamente se o e-Mola recebeu o dinheiro. A compra fica pendente até a integração com um serviço de pagamentos ou confirmação segura pelo vendedor.
''') s=s.replace('function sendProof(){let msg=encodeURIComponent("Olá, quero comprar fotografias no FF FOTO DE PAREDE. Vou enviar o comprovativo do pagamento e aguardar confirmação.");window.open("https://wa.me/258869687445?text="+msg,"_blank")}', '''function sendProof(){let n=$("payDialog").dataset.n||"um pacote";let price=$("payDialog").dataset.price||"a confirmar";let msg=encodeURIComponent(`Olá, quero comprar ${n} fotos por ${price} MT no FF FOTO DE PAREDE. Estou a enviar o comprovativo do pagamento por e-Mola. Por favor, confirmem o pagamento.`);window.open("https://wa.me/258869687445?text="+msg,"_blank")} function markPending(){$("pendingStatus").textContent="Pedido registado apenas nesta demonstração como PENDENTE. O acesso só pode ser libertado após confirmação real do pagamento."; }''') # fix obviously malformed image URLs in two category entries s=s.replace('https://images.unsplash.com/photo-150467 keluar?auto=format&fit=crop&w=500&q=80','https://images.unsplash.com/photo-1504674900247-0877df9cc836?auto=format&fit=crop&w=500&q=80') s=s.replace('https://images.unsplash.com/photo-148864当?auto=format&fit=crop&w=500&q=80','https://images.unsplash.com/photo-1488646953014-85cb44e25828?auto=format&fit=crop&w=500&q=80') out=Path("/mnt/data/FF_Foto_de_Parede_v2.html") out.write_text(s,encoding="utf-8") print(f"Versão atualizada criada: {out} ({out.stat().st_size} bytes); categorias: {s.count('https://images.unsplash.com/')}")