This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#codigo de python para hacer scrap | |
import os | |
import re | |
def detectar_encoding(path): | |
with open(path, 'rb') as f: | |
try: | |
contenido = f.read(2048).decode("latin1") | |
match = re.search(r"\('encoding'\s*'([^']+)'\)", contenido) | |
if match: |