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

Change crawler default settings around userAgent and mobileDevice #292

Merged
merged 3 commits into from
Mar 27, 2024

Conversation

benoit74
Copy link
Collaborator

@benoit74 benoit74 commented Mar 27, 2024

Fix #291

Changes:

  • Rollback previous changes around the presence of a default user-agent made in Revisit check-url behavior and provide User-Agent a custom default value #229
  • Set a default mobile device as "Pixel 2" so that it is more inline with the expectation that we are creating ZIMs for mobile devies (and Youtube videos have higher chance to work on all devices)
  • Add a new --noMobileDevice to be able to completely remove this default value
  • Remove trailing characters when retrieving Browsertrix Crawler version (unrelated to issue, just stumbled upon while debugging)
  • Upgrade to Browsertrix Crawler 1.0.3 (not using 1.1.0-beta branch since it is less recent / seems to be upgraded less often)

@benoit74 benoit74 self-assigned this Mar 27, 2024
- Remove default userAgent value
- Set a default mobileDevice
- Add back comments explaining that userAgent overrides other settings
- Add back logic around the computation of the userAgentSuffix instead
  of the userAgent
- Add new noMobileDevice argument to not set the default mobileDevice
@benoit74 benoit74 marked this pull request as ready for review March 27, 2024 15:11
@benoit74 benoit74 requested a review from rgaudin March 27, 2024 15:11
Copy link

codecov bot commented Mar 27, 2024

Codecov Report

Attention: Patch coverage is 0% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 14.45%. Comparing base (5c71674) to head (728784d).
Report is 2 commits behind head on zimit2.

Files Patch % Lines
src/zimit/zimit.py 0.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           zimit2     #292      +/-   ##
==========================================
- Coverage   14.91%   14.45%   -0.47%     
==========================================
  Files           1        1              
  Lines         248      249       +1     
  Branches       35       35              
==========================================
- Hits           37       36       -1     
- Misses        211      213       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@rgaudin rgaudin left a comment

Choose a reason for hiding this comment

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

LGTM ; better defaults 👍

@rgaudin rgaudin merged commit f637c3f into zimit2 Mar 27, 2024
4 of 6 checks passed
@rgaudin rgaudin deleted the ua_not_mandatory branch March 27, 2024 15:51
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.

2 participants