Skip to content

A weird problem: get 404 page by read method #109

Description

@winglight

Here's the url: http://www.8wenku.com/book/2414

I tried to open this page by postman or browser those are normal web page, but I got a 404 page after the read method callback return the article.

The code is followed here:

read(url, {strictSSL: false, headers: {
                    'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36'
                }},function(err, article, meta) {
                if (!err) {
                    //article.content or article.html display a 404 page here

                    // Close article to clean up jsdom and prevent leaks
                    article.close();
                } else {
                    console.log("crawlTopic read error: " + err);
                    callback(err);
                }

            });

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions