GithubHelp home page GithubHelp logo

Comments (6)

maturban avatar maturban commented on June 20, 2024

Done.

Now if no argument provided, the page will be pushed into "ia". If "ia" is not there, the first archive in the list will be considered as the default one.

Example:
$ archivenow www.foxnews.com
['https://web.archive.org/web/20170215165408/http://www.foxnews.com']

from archivenow.

machawk1 avatar machawk1 commented on June 20, 2024

@maturban I am getting an error when I try what you did.

$ archivenow www.foxnews.com
['The Internet Archive: Unexpected error']

I might be good to report what the "Unexpected error" is.

I am using version: 2017.2.15.12.17.30 from pip, as reported by pip show archivenow.

from archivenow.

maturban avatar maturban commented on June 20, 2024

@machawk1 Here is how errors/exceptions are handled for now:

            ...
        except Exception as e:
            pass;
        return self.name+ ": Unexpected error"

where self.name is the name of an archive

would it be fine to do:

            ...
        except Exception as e:
            pass;
        return "Error ("+self.name+ ")"+str(e)

or should I catch each exception separately ?

from archivenow.

machawk1 avatar machawk1 commented on June 20, 2024

@maturban It would be good to know WHY the push to the archive failed. If an archive is down, for example, you might expect requests.exceptions.ConnectTimeout and perform some action in the except body then report more information about the error instead of simply saying, "An error occurred".

from archivenow.

maturban avatar maturban commented on June 20, 2024

@machawk1
Now, a more meaningful message is shown when an error is occurred

from archivenow.

machawk1 avatar machawk1 commented on June 20, 2024

@maturban You can probably close this ticket, as the request has been fulfilled.

I pulled a new version, killed my internet connection and tried

archivenow www.cs.odu.edu/~mln/

The error I got seemed weird:

["Error (The Internet Archive): HTTPSConnectionPool(host='web.archive.org', port=443): Max retries exceeded with url: /save/www.cs.odu.edu/~mln/ (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x105933950>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',))"]

from archivenow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.