View Single Post
Old 11-16-2010, 03:57 PM   #9
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by kovidgoyal View Post
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.
Starson17 is offline   Reply With Quote