[CLI] StoriesOnline.net error when over daily limit

225 views
Skip to first unread message

Gwydion Comyn

unread,
Apr 11, 2016, 7:28:11 PM4/11/16
to FanFicFare (was FanFictionDownLoader)
I've encountered this error recently, and tried to fix the adapter... but it kept breaking...

If you receive a page with '"Sorry! You have reached your daily limit"', it courently breacks, because it can't find the title of the story. I tried to add to the if else statement to bypass this, but it still breaks... I tried adding:

        elif "Sorry! You have reached your daily limit" in data:
            raise exceptions.FailedToDownload(self.getSiteDomain() +" says: Sorry! You have reached your daily limit of stories per day")

at line 150 in the adapter_storiesonlinenet.py file.

I basically copied the the filtered elif lines...

This should probably be put in the code, but I can't figure out why it still breaks.

GComyn

Jim Miller

unread,
Apr 11, 2016, 7:37:56 PM4/11/16
to fanfic-d...@googlegroups.com

How many hits does it take to exceed the daily limit?

Can you save an html page that shows that message to get an exact match
from?

Gwydion Comyn

unread,
Apr 11, 2016, 7:50:44 PM4/11/16
to FanFicFare (was FanFictionDownLoader)
If you have a free account 16, if you have a Premium account, 100..

when I encountered the error, I had it print the data so I could copy it from stdin... the "sorry" is a direct copy off of stdin.  the break hapens on the raise.exceptions line.

Here is the html for the "sorry" page:


<!DOCTYPE html>
<html lang="en">
<head><meta charset="utf-8" />
<title>Error! Daily Limit Reached</title>
<meta name="viewport" content="width=device-width">
<style>
@import url('http://res.storiesonline.net/css/stories.css');
   
</style>
<script src="http://res.storiesonline.net/js/dc.min.3.js"></script>
<script src="http://res.storiesonline.net/js/vote3.js"></script>

<script src="http://res.storiesonline.net/js/scrol.js"></script>
<script>
function el(id) {
var data;
if(ajx){
doCommand('moreData','shStDetails',[id]);}
else{window.location='/library/storyInfo.php?id='+id;}
}
</script></head>
<body id="sol-story" onLoad="runScroller('/s/73564/hindsight-20-20-book-2');">
<div itemscope itemtype="http://schema.org/Book">
<div id="story">
<nav><div id="top-header">
<div id="sd"></div>
<a id="page-top"></a>
<a href="/home.php">Home</a> 
<span id="h_extra"></span></div></nav>
<article>
<h3 class="c">Sorry! You have reached your daily limit of 16 stories per day</h3>
<h4 class="c">Your counter will be reset back to zero<br><br>on <script>tstamp = new Date(1460497550000);document.write(tstamp.toLocaleString());</script><noscript>2016-04-12 at 05:45:50 pm</noscript><br><br>Which is:<br>
21 hours, 56 minutes and 50 seconds<br>from now.<br><br>Until then, you can browse story listings, read reviews and author blogs.</h4>

</article>
<footer>
<div id="bott-header">
<div id="dhold"></div>
<a id="page-bottom"></a>
<a href="/home.php">Home</a> |
<a href="#page-top">Top</a>
 | <a href="/a/SmokinDriver" rel="author">SmokinDriver's Page</a> |  &nbsp; <span class="error sm"><a href="javascript:ef=0;if(ajx){doCommand('moreData','gff',['73564','w5fJBn','0']);}else{window.location='https://storiesonline.net/sol-secure/res/misc/mail.php?id=73564&amp;mSource=story';}">Feedback to author</a></span></div></footer>
</div></div></body></html>


Jim Miller

unread,
Apr 11, 2016, 11:18:46 PM4/11/16
to fanfic-d...@googlegroups.com

You could instead try looking for "Error! Daily Limit Reached", like so:

> if "Access denied. This story has not been validated by the adminstrators of this site." in data:
> raise exceptions.AccessDenied(self.getSiteDomain() +" says: Access denied. This story has not been validated by the adminstrators of this site.")
> elif "Error! The story you're trying to access is being filtered by your choice of contents filtering." in data:
> raise exceptions.FailedToDownload(self.getSiteDomain() +" says: Error! The story you're trying to access is being filtered by your choice of contents filtering.")
> elif "Error! Daily Limit Reached" in data:
> raise exceptions.FailedToDownload(self.getSiteDomain() +" says: Error! Daily Limit Reached")

I don't know why looking for "Sorry! You have reached your daily limit"
didn't work.

On 4/11/2016 6:50 PM, Gwydion Comyn wrote:
> If you have a free account 16, if you have a Premium account, 100..
>
> when I encountered the error, I had it print the data so I could copy it
> from stdin... the "sorry" is a direct copy off of stdin. the break
> hapens on the raise.exceptions line.
>
> Here is the html for the "sorry" page:
>
>
> <!DOCTYPE html>
> <html lang="en">
> <head><meta charset="utf-8" />
> <title>Error! Daily Limit Reached</title>
> ...
Reply all
Reply to author
Forward
0 new messages