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 ellipsis to 3 dots for ZYTE_API_LOG_REQUESTS text truncation #136

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

BurnzZ
Copy link
Member

@BurnzZ BurnzZ commented Sep 28, 2023

Motivation: I got confused when looking at the Scrapy Cloud logs since it says I got a request on http://books.toscrape.com/catalogue/category/books/romance_8/in\u2026

Log example:

[scrapy_zyte_api.handler] Sending Zyte API extract request: {"httpResponseBody": true, "httpResponseHeaders": true,
 "customHttpRequestHeaders": [{"name": "Referer", "value": "http://books.toscrape.com/"}, {"name": "Accept", "value": 
"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"}, {"name": "Accept-Language", "value": "en"}, {"name": 
"Accept-Encoding", "value": "gzip, deflate, br"}], "jobId": "633164/22/65", "url": 
"http://books.toscrape.com/catalogue/category/books/romance_8/in\u2026"}

It turns out this \u2026 character was the ellipsis character. What do you think about changing this to 3 dots instead?

@codecov
Copy link

codecov bot commented Sep 28, 2023

Codecov Report

Merging #136 (1c06afa) into main (207fed4) will not change coverage.
Report is 2 commits behind head on main.
The diff coverage is 100.00%.

❗ Current head 1c06afa differs from pull request most recent head b4ce6e0. Consider uploading reports for the commit b4ce6e0 to get more accurate results

@@           Coverage Diff           @@
##             main     #136   +/-   ##
=======================================
  Coverage   98.81%   98.81%           
=======================================
  Files           9        9           
  Lines         673      673           
=======================================
  Hits          665      665           
  Misses          8        8           
Files Coverage Δ
scrapy_zyte_api/handler.py 97.94% <100.00%> (ø)

Copy link
Contributor

@Gallaecio Gallaecio left a comment

Choose a reason for hiding this comment

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

Yeap. I love me some Unicode, and I’m pretty sure I did this, but it’s either we get rendered instead of \u… or we switch to ....

@kmike kmike merged commit 3db30f1 into main Oct 4, 2023
15 checks passed
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