Quote:
Originally Posted by kovidgoyal
The use of populate_article_metadata is correct
|
This is interesting. I had never seen populate_article_metadata used in anything, so I played around with it a bit. You certainly can modify the index page. I easily changed article.title and article.text_summary. Those changes appeared on the index page.
I could also change article.author (although I don't see it used anywhere, so I'm not sure why you would want to change it.) When I tried to change article.date, it seemed to accept it (no errors), but it didn't appear on the index page. I used:
Code:
article.date = datetime.datetime.now()
When I intentionally used the wrong date format, I got "Could not fetch link" errors. I suspect the date format was wrong when using:
Code:
article.date = soup.find('div', {"class": "date"}).contents[0].strip()
Even if the date format was correct, I'm not sure if it would change the index page? Nothing I did would change it.