google-code-export / fanficdownloader

Automatically exported from code.google.com/p/fanficdownloader
0 stars 0 forks source link

ffnet download broken again #63

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Are you using the CLI, web service or calibre plugin?
CLI

What is the story URL?
http://www.fanfiction.net/s/7977390/

What is the output format you used?
html

What is the expected output? What do you see instead?
Traceback (most recent call last):
  File "downloader.py", line 319, in <module>
    main(sys.argv[1:])
  File "downloader.py", line 248, in main
    adapter.getStoryMetadataOnly()
  File "/home/fanficdownloader-4.4.82/fanficdownloader/adapters/base_adapter.py", line 243, in getStoryMetadataOnly
    self.extractChapterUrlsAndMetadata()
  File "/home/fanficdownloader-4.4.82/fanficdownloader/adapters/adapter_fanfictionnet.py", line 219, in extractChapterUrlsAndMetadata
    self.story.setMetadata('dateUpdated',makeDate(metalist[0].split(':')[1].strip(), '%m-%d-%y'))
  File "/home/fanficdownloader-4.4.82/fanficdownloader/adapters/base_adapter.py", line 414, in makeDate
    return datetime.datetime.strptime(string,dateform)
  File "/usr/lib/python2.7/_strptime.py", line 325, in _strptime
    (data_string, format))
ValueError: time data '11/11' does not match format '%m-%d-%y'

What version of the product are you using? On what operating system?
latest version, CLI, 4.4.82

Please provide any additional information below.
It's possible a known problem, but ffnet's newest change in the date format 
system has broken fanficdownloader again. 

Original issue reported on code.google.com by amelie...@web.de on 13 Nov 2013 at 10:20

GoogleCodeExporter commented 9 years ago
I've attached an *unofficial* build that should fix this. Please test.

I'm a little concerned that you see 11/11, as the one I see also have the year.

Original comment by asbjorn....@gmail.com on 13 Nov 2013 at 11:30

Attachments:

GoogleCodeExporter commented 9 years ago
My concern was well founded. They use both mm/dd and mm/dd/yyyy as date formats.
New test build.

Original comment by asbjorn....@gmail.com on 13 Nov 2013 at 11:49

Attachments:

GoogleCodeExporter commented 9 years ago
Thank you. 

I've tested it with 10 different fics from different years, and it seems that 
while the older fics (2004-2012) seem to be alright, 2013 puts 1900 as the year 
of update/publish.

For example, for the link above we have:

Published:  2012-04-01
Updated:    1900-11-11

Original comment by amelie...@web.de on 13 Nov 2013 at 12:32

GoogleCodeExporter commented 9 years ago
I should add that otherwise all seems well. Though why they think it's a good 
idea to get rid of the year of publish/update, I have no idea. They like to 
screw around with what works. 

Original comment by amelie...@web.de on 13 Nov 2013 at 12:35

GoogleCodeExporter commented 9 years ago
There's also a problem that they also use hours and perhaps minutes for when 
the last update happened (see for example 
http://www.fanfiction.net/s/9805735/1/)

Original comment by mastodon...@gmail.com on 13 Nov 2013 at 1:20

GoogleCodeExporter commented 9 years ago
Indeed.

Having installed that latest test build into Calibre, the FFDL error log for 
http://www.fanfiction.net/s/9843793/1/ says "time data '1h ago' does not match 
format '%m/%d/%Y'"

However, http://www.fanfiction.net/s/3883938/1/ imported successfully, as it 
was last updated years ago.

Original comment by chyron8...@gmail.com on 13 Nov 2013 at 2:44

GoogleCodeExporter commented 9 years ago
None of it is working for me I keep getting

Status
Title
Author
Comment
URL
Bad
Unknown
Unknown
time data '5/15/2008' does not match format '%m-%d-%y'
http://www.fanfiction.net/s/3883938/1/

Original comment by cmstrobr...@gmail.com on 13 Nov 2013 at 2:46

GoogleCodeExporter commented 9 years ago
I just tried the new test build with http://www.fanfiction.net/s/9813621/1/ and 
it worked in Calibre.

It would seem that the issue now is with anything that has been published or 
updated less than 24 hours ago.

Original comment by chyron8...@gmail.com on 13 Nov 2013 at 2:51

GoogleCodeExporter commented 9 years ago
New test PI version with fix at:

http://www.mobileread.com/forums/showthread.php?p=2685198#post2685198

Original comment by retiefj...@gmail.com on 13 Nov 2013 at 4:43

GoogleCodeExporter commented 9 years ago
You are using the timestamp I take it?

Original comment by asbjorn....@gmail.com on 13 Nov 2013 at 4:54

GoogleCodeExporter commented 9 years ago
Yes.  I just pushed the changes so you can see them.  It's actually a lot 
tidier than before.

Original comment by retiefj...@gmail.com on 13 Nov 2013 at 4:57

GoogleCodeExporter commented 9 years ago
Definitely, my attempt was getting a bit... "iffy"

Original comment by asbjorn....@gmail.com on 13 Nov 2013 at 5:02

GoogleCodeExporter commented 9 years ago
Fixed in PI 1.7.53 / CLI 4.4.83.

Original comment by retiefj...@gmail.com on 13 Nov 2013 at 6:26