Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import datetime
- class Post:
- def __init__(self, titulo, link, fecha, autor, respuestas, visitas):
- self.titulo = titulo
- self.link = link
- self.fecha = fecha
- #self.fecha = datetime.datetime.strptime(fecha, '%a, %d %b %Y %H:%M:%S +0000').date()
- self.autor = autor
- self.respuestas = respuestas
- self.visitas = visitas
- def __str__(self):
- return "\nTítulo: " + self.titulo+"\nLink: " + self.link+"\nFecha: " + self.fecha+"\nAutor: "+self.autor+"\nRespuestas: "+self.respuestas+"\nVisitas: "+self.visitas
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement