RECURRENT DONATION
Donate monthly to support
the NeculaiFantanaru.com project
ລັກສະນະທີ່ສໍາຄັນຂອງຫນັງສືເຫຼັ້ມນີ້ໃນການປຽບທຽບກັບຄົນອື່ນໃນຕະຫຼາດໃນໂດເມນດຽວກັນແມ່ນວ່າມັນອະທິບາຍໂດຍຜ່ານຕົວຢ່າງຄວາມສາມາດທີ່ເຫມາະສົມຂອງຜູ້ນໍາ. ຂ້າພະເຈົ້າບໍ່ເຄີຍອ້າງວ່າມັນເປັນການງ່າຍທີ່ຈະເປັນຜູ້ນໍາທີ່ດີ, ແຕ່ຖ້າຫາກວ່າປະຊາຊົນຈະ...
ຂ້າພະເຈົ້າໄດ້ຂຽນຫນັງສືເຫຼັ້ມນີ້ທີ່ປະສົມປະສານກັບການພັດທະນາສ່ວນບຸກຄົນແບບງ່າຍໆກັບການເປັນຜູ້ນໍາ, ຄືກັນກັບການປິດສະຫນາ, ບ່ອນທີ່ທ່ານຕ້ອງຈັບຄູ່ທຸກຊິ້ນທີ່ໃຫ້ມາເພື່ອປະກອບຮູບພາບທົ່ວໄປ.
ຈຸດປະສົງຂອງປຶ້ມຫົວນີ້ແມ່ນເພື່ອສະເຫນີໃຫ້ທ່ານຮູ້ໂດຍຜ່ານຕົວຢ່າງທີ່ຊັດເຈນແລະສະແດງໃຫ້ທ່ານເຫັນວິທີການທີ່ຈະໄດ້ຮັບຄວາມສາມາດທີ່ຈະເຮັດໃຫ້ຄົນອື່ນເຫັນສິ່ງຕ່າງໆຈາກມຸມດຽວກັນກັບທ່ານ.
ທ່ານສາມາດເບິ່ງລະຫັດເຕັມທີ່ນີ້:https: // Passatin.com / Qingming PBM NM ຈັດເຂົ້າPython. For example I have this page: my-name-is-prince.html ແລະຫນ້າ html ນີ້ມີປ້າຍຊື່:<ຫົວຂໍ້>ຂ້ອຍຮັກ Freddie Mercury title> ຜົນໄດ້ຮັບ:ຫຼັງຈາກທີ່ໃຊ້ລະຫັດ Python, ຂ້ອຍຈະແຍກແລະປ່ຽນປ້າຍຊື່ເປັນລິງ. ຈະກາຍເປັນ: ຂ້າພະເຈົ້າ love-freddy-mercury.htmlຄືກັນ<ຫົວຂໍ້>ຂ້ອຍຮັກ Freddie Mercury title>
from bs4 import BeautifulSoup from bs4.formatter import HTMLFormatter import requests import re import execjs from urllib import parse import json import os class UnsortedAttributes(HTMLFormatter): def attributes(self, tag): for k, v in tag.attrs.items(): yield k, v def read_text_from_file(file_path): """ Aceasta functie returneaza continutul unui fisier. file_path: calea catre fisierul din care vrei sa citesti """ with open(file_path, encoding='utf8') as f: text = f.read() return text def write_to_file(text, file_path): """ Aceasta functie scrie un text intr-un fisier. text: textul pe care vrei sa il scrii file_path: calea catre fisierul in care vrei sa scrii """ with open(file_path, 'wb') as f: f.write(text.encode('utf8', 'ignore')) files_from_folder = "e:\\Folder" extension_file = ".html" directory = os.fsencode(files_from_folder) amount = 1 for file in os.listdir(directory): filename = os.fsdecode(file) if filename == 'y_key_e479323ce281e459.html' or filename == 'directory.html': continue if filename.endswith(extension_file): current_file_name = '' new_file_name = '' with open(os.path.join(files_from_folder, filename), encoding='utf-8') as html: file_text = html.read() soup = BeautifulSoup('', 'html.parser') text_title = soup.findAll('title')[0].get_text() print(f'{filename} changed filename ({amount})') amount += 1 new_filename = text_title # replace 's new_filename = re.sub('\'\w', '', new_filename) new_filename = new_filename.lower() words = re.findall(r'\w+', new_filename) new_filename = '-'.join(words) new_filename = new_filename + '.html' new_filename = os.fsdecode(new_filename) # inlocuire nume fisier current_file_name = os.path.join(files_from_folder, filename) new_file_name = os.path.join(files_from_folder, new_filename) canonical_pattern = re.compile('') canonical = re.findall(canonical_pattern, file_text) if len(canonical) > 0: canonical = canonical[0] link_nou = "https://trinketbox.ro/en/" + '-'.join(words) + ".html" file_text = file_text.replace(canonical, link_nou) write_to_file(file_text, current_file_name) else: print("Nu am gasit tag-ul canonical in fisier") html.close() os.rename(current_file_name, new_file_name)'+ file_text + ' That's all folks. ນອກຈາກນີ້, ເບິ່ງນີ້ຮຸ່ນ 2ຫຼື ຮຸ່ນ 3ຫຼືຮຸ່ນ 4ຫຼືຮຸ່ນ 5ຫຼືຮຸ່ນ 6ຫຼືຮຸ່ນ 7 Latest articles accessed by readers:
Donate via Paypal
RECURRENT DONATIONDonate monthly to support SINGLE DONATIONDonate the desired amount to support Donate by Bank TransferAccount Ron: RO34INGB0000999900448439
Open account at ING Bank
|
||||||||||||
![]() |
||||||||||||