JimmXinu / FanFicFare

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

Get AO3 restricted series fails even with user/pass set #979

Closed kyoam closed 1 year ago

kyoam commented 1 year ago

okay so for the personal ini you should be able to set fff to use a username and password to dl fics well i tried that on the archiveof our own section by setting the personal ini with youre username and password like so

use_basic_cache:true username:*** password:**

removing the ## like i've seen in the use brower cache solution proposed for ao3 a week ago. i thought this should use my user name and password to bypass having to enter it in each time but upon doing that i attempted to dl an anthology at this address https://archiveofourown.org/series/2718205 and this is the result

calibre, version 6.23.0 ERROR: Unhandled exception: FailedToDownload:This work is only available to registered users of the Archive -- set username/password in personal.ini under [archiveofourown.org]

calibre 6.23 embedded-python: True Windows-10-10.0.19045-SP0 Windows ('64bit', 'WindowsPE') ('Windows', '10', '10.0.19045') Python 3.10.1 Windows: ('10', '10.0.19045', 'SP0', 'Multiprocessor Free') Interface language: None Successfully initialized third party plugins: EpubMerge (2, 15, 0) && FanFicFare (4, 25, 0) Traceback (most recent call last): File "calibre_plugins.fanficfare_plugin.fff_plugin", line 944, in update_anthology File "calibre_plugins.fanficfare_plugin.fff_plugin", line 686, in get_urls_from_page File "C:\Users\Owner\AppData\Roaming\calibre\plugins\FanFicFare.zip\fanficfare\geturls.py", line 44, in get_urls_from_page File "C:\Users\Owner\AppData\Roaming\calibre\plugins\FanFicFare.zip\fanficfare\adapters\base_adapter.py", line 463, in get_urls_from_page File "C:\Users\Owner\AppData\Roaming\calibre\plugins\FanFicFare.zip\fanficfare\adapters\adapter_archiveofourownorg.py", line 622, in get_series_from_page fanficfare.exceptions.FailedToDownload: This work is only available to registered users of the Archive -- set username/password in personal.ini under [archiveofourown.org]

what excatly am i doing wrong here?

JimmXinu commented 1 year ago

I don't see the login code attempting to run in this output. The error would come from performLogin if it had.

That suggests that you don't have your user/pass under the correct section of personal.ini. It should look like:

[archiveofourown.org]
username:YourName
password:yourpassword

Or perhaps that you have more than one [archiveofourown.org] section that sets one of user/pass to empty? Wiki page.

Running Calibre in debug mode will give more output, such as showing the username it tries to use. It's under the Calibre Preferences dropdown.

FYI, you don't need to copy use_basic_cache to personal.ini.

If you still can't figure it out, post your entire pesonal.ini. There's a button in FFF Config to get a 'Safe' version that obscures user/pass values.

kyoam commented 1 year ago

my safe mode ini copied here

## This is an example of what your personal configuration might look
## like.  Uncomment options by removing the '#' in front of them.

[defaults]
## [defaults] section applies to all formats and sites but may be
## overridden at several levels.  Example:

## [defaults]
## titlepage_entries: category,genre, status
## [www.whofic.com]
## # overrides defaults.
## titlepage_entries: category,genre, status,dateUpdated,rating
## [epub]
## # overrides defaults & site section
## titlepage_entries: category,genre, status,datePublished,dateUpdated,dateCreated
## [www.whofic.com:epub]
## # overrides defaults, site section & format section
## titlepage_entries: category,genre, status,datePublished
## [overrides]
## # overrides all other sections
## titlepage_entries: category

## Some sites also require the user to confirm they are adult for
## adult content.  Uncomment by removing '#' in front of is_adult.
#is_adult:true

## Don't like the numbers at the start of chapter titles on some
## sites?  You can use strip_chapter_numbers to strip them off.  Just
## want to make them all look the same?  Strip them off, then add them
## back on with add_chapter_numbers.  Don't like the way it strips
## numbers or adds them back?  See chapter_title_strip_pattern and
## chapter_title_add_pattern.
#strip_chapter_numbers:true
#add_chapter_numbers:true

## Add this to genre if there's more than one category.
#add_genre_when_multi_category: Crossover

[epub]
## include images from img tags in the body and summary of stories.
## Images will be converted to jpg for size if possible.  Images work
## in epub format only.  To get mobi or other format with images,
## download as epub and use Calibre to convert.
#include_images:true

## If not set, the summary will have all html stripped for safety.
## Both this and include_images must be true to get images in the
## summary.
#keep_summary_html:true

## If set, the first image found will be made the cover image.  If
## keep_summary_html is true, any images in summary will be before any
## in chapters.
#make_firstimage_cover:true

## Resize images down to width, height, preserving aspect ratio.
## Nook size, with margin.
#image_max_size: 580, 725

## Change image to grayscale, if graphics library allows, to save
## space.
#grayscale_images: false

## Most common, I expect will be using this to save username/passwords
## for different sites.  Here are a few examples.  See defaults.ini
## for the full list.

[defaults]
browser_cache_path:C:\Users\Owner\AppData\Local\Mozilla\Firefox\Profiles\ukswal4z.default-release-1685559165419\cache2
browser_cache_age_limit:4.0
open_pages_in_browser:true

[archiveofourown.org]
username:XXXXXXXX
password:XXXXXXXX

[www.twilighted.net]
#username:XXXXXXXX
#password:XXXXXXXX
## default is false
#collect_series: true

[ficwad.com]
#username:XXXXXXXX
#password:XXXXXXXX

[www.adastrafanfic.com]
## Some sites do not require a login, but do require the user to
## confirm they are adult for adult content.
#is_adult:true

[www.twcslibrary.net]
#username:XXXXXXXX
#password:XXXXXXXX
#is_adult:true
## default is false
#collect_series: true

[www.fimfiction.net]
#is_adult:true
#fail_on_password:XXXXXXXX

[www.tthfanfic.org]
#is_adult:true
## tth is a little unusual--it doesn't require user/pass, but the site
## keeps track of which chapters you've read and won't send another
## update until it thinks you're up to date.  This way, on download,
## it thinks you're up to date.
#username:XXXXXXXX
#password:XXXXXXXX

## This section will override anything in the system defaults or other
## sections here.
[overrides]
## default varies by site.  Set true here to force all sites to
## collect series.
#collect_series: true
JimmXinu commented 1 year ago

FYI, I edited your comment to format better (added ```).

I see what's going on here now. Most users with user/pass in personal.ini also have is_adult:true set which masks this.

JimmXinu commented 1 year ago

Test versions up.

kyoam commented 1 year ago

worked right as rain thanks

JimmXinu commented 10 months ago

For future reference, see also 1673da5a4bd0e64a0b7e22b20f4af7eaf018af2f and MR post