JimmXinu / FanFicFare

FanFicFare is a tool for making eBooks from stories on fanfiction and other web sites.
Other
768 stars 165 forks source link

RoyalRoadL Adapter Broken #184

Closed Green0Photon closed 7 years ago

Green0Photon commented 7 years ago

I went to download the newest update to The Arcane Emperor, using the website, but it didn't work.

It looks like they updated the url to have the name in it (chapter titles too), which needs to be fixed. When I downloaded and ran it with the normal url, genre screws up and doesn't find anything.

Traceback (most recent call last):
  File "C:\msys64\mingw64\bin\fanficfare-script.py", line 11, in <module>
    load_entry_point('FanFicFare==2.12.6', 'console_scripts', 'fanficfare')()
  File "fanficfare/cli.py", line 240, in main
    passed_personalini)
  File "fanficfare/cli.py", line 330, in do_download
    adapter.getStoryMetadataOnly()
  File "fanficfare/adapters/base_adapter.py", line 197, in getStoryMetadataOnly
    self.doExtractChapterUrlsAndMetadata(get_cover=get_cover)
  File "fanficfare/adapters/base_adapter.py", line 280, in doExtractChapterUrlsAndMetadata
    return self.extractChapterUrlsAndMetadata()
  File "fanficfare/adapters/adapter_royalroadl.py", line 155, in extractChapterUrlsAndMetadata
    genre=[tag.text for tag in soup.find('input',{'property':'genre'}).parent.findChildren('span')]
AttributeError: 'NoneType' object has no attribute 'parent'

I commented it (lines 156-159) out, and it works, but the title just had the word "About", so I manually set it. It seems to work, but I don't know if there are any other bugs. You obviously can't hotwire it like I did, though.

Essentially, the RoyalRoadL adapter is broken, and I believe it's mostly because they changed urls, but it still partially works because of forwarding. In addition, this broke several other things as well, including but not limited to: title and genre.

Thanks for your work on this BTW.

JimmXinu commented 7 years ago

@cryzed, do you want to take a look at this, or should I?

cryzed commented 7 years ago

I'll take a look.

JimmXinu commented 7 years ago

Looks fixed. In the next test version.