Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log settings changes and ignores #221

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JustAnotherArchivist
Copy link
Contributor

@JustAnotherArchivist JustAnotherArchivist commented May 7, 2022

Example output from grab-site --concurrency 1 --delay 5000 https://www.example.org/:

2022-05-07 02:15:25,835 - wpull.application.tasks.plugin - INFO - Found plugin wpull_hooks_py from /app/libgrabsite/wpull_hooks.py.
2022-05-07 02:15:25,839 - grab_site.wpull_plugin - INFO - Adding ignore: /bxSlider/bxSlider/
2022-05-07 02:15:25,839 - grab_site.wpull_plugin - INFO - Adding ignore: ^https?://(www|px\.srvcs)\.tumblr\.com/(impixu\?|share(/link/?)?\?|reblog/)
<snip>
2022-05-07 02:15:25,847 - grab_site.wpull_plugin - INFO - Adding ignore: ^https?://www\.warnerbros\.com/\d+$
2022-05-07 02:15:26,036 - wpull.processor.web - INFO - Fetching ‘https://www.example.org/’.
2022-05-07 02:15:26,633 - grab_site.wpull_plugin - INFO - Settings change: max_content_length = -1
2022-05-07 02:15:26,642 - wpull.processor.web - INFO - Fetched ‘https://www.example.org/’: 200 OK. Length: 1256 [text/html; charset=UTF-8].
2022-05-07 02:15:26,652 - grab_site.wpull_plugin - INFO - Settings change: delay = 5000
2022-05-07 02:15:26,652 - grab_site.wpull_plugin - INFO - Settings change: concurrency = 1
2022-05-07 02:15:31,668 - wpull.processor.web - INFO - Fetching ‘https://www.example.org/robots.txt’.
2022-05-07 02:15:31,812 - wpull.processor.web - INFO - Fetched ‘https://www.example.org/robots.txt’: 404 Not Found. Length: 445 [text/html; charset=UTF-8].
2022-05-07 02:15:36,825 - grab_site.wpull_plugin - INFO - Adding ignore: asdfasdfasdf
2022-05-07 02:15:36,879 - wpull.processor.web - INFO - Fetching ‘https://www.example.org/sitemap.xml’.
2022-05-07 02:15:37,023 - wpull.processor.web - INFO - Fetched ‘https://www.example.org/sitemap.xml’: 404 Not Found. Length: 445 [text/html; charset=UTF-8].
2022-05-07 02:15:42,034 - wpull.processor.web - INFO - Fetching ‘https://www.iana.org/domains/example’.
2022-05-07 02:15:42,505 - wpull.processor.web - INFO - Fetched ‘https://www.iana.org/domains/example’: 301 Moved Permanently. Length: 244 [text/html; charset=iso-8859-1].
2022-05-07 02:15:47,511 - wpull.processor.web - INFO - Fetching ‘http://www.iana.org/domains/reserved’.
2022-05-07 02:15:47,833 - wpull.processor.web - INFO - Fetched ‘http://www.iana.org/domains/reserved’: 200 OK. Length: 10914 [text/html; charset=UTF-8].
2022-05-07 02:15:52,866 - wpull.processor.web - INFO - Fetching ‘http://www.iana.org/_js/jquery.js’.
2022-05-07 02:15:53,574 - wpull.processor.web - INFO - Fetched ‘http://www.iana.org/_js/jquery.js’: 200 OK. Length: 89501 [application/javascript].
2022-05-07 02:15:58,607 - grab_site.wpull_plugin - INFO - Adding ignore: www\.iana
2022-05-07 02:15:58,607 - grab_site.wpull_plugin - INFO - Removing ignore: asdfasdfasdf
2022-05-07 02:15:58,660 - grab_site.wpull_plugin - INFO - Ignoring ‘http://www.iana.org/_js/iana.js’: [ignore pattern match]
2022-05-07 02:15:58,668 - grab_site.wpull_plugin - INFO - Ignoring ‘http://www.iana.org/_css/2022/iana_website.css’: [ignore pattern match]
2022-05-07 02:15:58,674 - grab_site.wpull_plugin - INFO - Ignoring ‘http://www.iana.org/_img/bookmark_icon.ico’: [ignore pattern match]
2022-05-07 02:15:58,679 - grab_site.wpull_plugin - INFO - Ignoring ‘http://www.iana.org/_img/2022/iana-logo-header.svg’: [ignore pattern match]
2022-05-07 02:15:58,684 - wpull.application.tasks.stats - INFO - FINISHED.
2022-05-07 02:15:58,684 - wpull.application.tasks.stats - INFO - Duration: 0:00:32. Speed: 3.6 KiB/s.
2022-05-07 02:15:58,684 - wpull.application.tasks.stats - INFO - Downloaded: 3 files, 99.3 KiB.

Copy link
Contributor

@TheTechRobo TheTechRobo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this a few months ago, and it worked fine.

@ivan
Copy link
Contributor

ivan commented Sep 25, 2022

I don't think I want to log every single URL that is ignored by default, but I would merge this if it were activated by some option.

@ivan
Copy link
Contributor

ivan commented Sep 25, 2022

I am open to being convinced that I must log every URL that is ignored, but most users seem to have been fine without it, and it increases both disk usage and possibly makes the logs very noisy on some sites.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants