google-code-export / fanficdownloader

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

At Fanfiction.net, parsing fail due to posible changes in the story page format #46

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Are you using the CLI, web service or calibre plugin?
Error found using both the CLI (4.4.51) and the calibre plugin (1.7.18).

What is the story URL?
http://www.fanfiction.net/s/9051357/1/Substitute-Wizards
http://www.fanfiction.net/s/6448082/17/DADA-boycott
http://www.fanfiction.net/s/8915631/1/What-Happens-When-A-God-Gets-Bored
http://www.fanfiction.net/s/7645594/1/Stalker-las-cronicas-del-stalker-magico
(... and every other story there is, it seems)

What is the output format you used?
epub

If calibre plugin, did you use Add New, Update EPUB if New Chapters, Update
EPUB Always, Overwrite if Newer, Overwrite Always or Update Calibre
Metadata Only?

Add New, and Update EPUB if New Chapters.

What steps will reproduce the problem?
1. "Add new from URL(s)" in the calibre plugin
2. Copy the URL (if not in the clipboard)
3. Press OK

What is the expected output? What do you see instead?
Expected: The story to be downloaded (and added to Calibre if using the plugin).

Output in Calibre:
Status: Bad
Title: Unknown
Author: Unknoen
Comment: 'NoneType' object has no attribute 'findAll'
URL: (url of the story)

Output in CLI:
Traceback (most recent call last):
  File "downloader.py", line 267, in <module>
    main(sys.argv[1:])
  File "downloader.py", line 203, in main
    adapter.getStoryMetadataOnly()
  File "/home/pola/Proyectos/fanficdownloader/fanficdownloader/adapters/base_adapter.py", line 238, in getStoryMetadataOnly
    self.extractChapterUrlsAndMetadata()
  File "/home/pola/Proyectos/fanficdownloader/fanficdownloader/adapters/adapter_fanfictionnet.py", line 163, in extractChapterUrlsAndMetadata
    for b in graydiv.findAll('button'):
AttributeError: 'NoneType' object has no attribute 'findAll'

What version of the product are you using? On what operating system?
CLI (4.4.51)
Calibre plugin (1.7.18) [Firefox 19.0.2]
SO: Ubuntu 12.10

Please provide any additional information below.
As seen in the CLI output, "graydiv", result of:
    "gui_table1i.find('div', {'class':'xgray'})"
is not a node. It seems that the format of the story page changed yet again.

Original issue reported on code.google.com by idackiew...@gmail.com on 29 Mar 2013 at 2:01

GoogleCodeExporter commented 9 years ago
Possible patch. It just change the parameters of the find() in 
adapter_fanfictionnet.py (line 163) for "'span', {'class':'xgray 
xcontrast_txt'}".

Original comment by idackiew...@gmail.com on 29 Mar 2013 at 2:24

Attachments:

GoogleCodeExporter commented 9 years ago
Already fixed in PI v1.7.19 and web/CLI version 4.4.52.  Please check the forum 
and/or discussion group before opening issues.

Original comment by retiefj...@gmail.com on 29 Mar 2013 at 2:27