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

URL encoding breaks the API #17

Open
MiguelX413 opened this issue Jan 16, 2023 · 1 comment
Open

URL encoding breaks the API #17

MiguelX413 opened this issue Jan 16, 2023 · 1 comment

Comments

@MiguelX413
Copy link

MiguelX413 commented Jan 16, 2023

https://www.amputatorbot.com/api/v1/convert?gac=true&md=3&q=https://amp.cnn.com/cnn/us/live-news/damar-hamlin-collapse-bills-bengals-game-intl-hnk/index.html yields:

[{'amp_canonical': None, 'canonical': {'domain': 'cnn', 'is_alt': False, 'is_amp': False, 'is_cached': None, 'is_valid': True, 'type': 'REL', 'url': 'https://www.cnn.com/us/live-news/damar-hamlin-collapse-bills-bengals-game-intl-hnk/index.html', 'url_similarity': 0.9473684210526315}, 'canonicals': [{'domain': 'cnn', 'is_alt': False, 'is_amp': False, 'is_cached': None, 'is_valid': True, 'type': 'REL', 'url': 'https://www.cnn.com/us/live-news/damar-hamlin-collapse-bills-bengals-game-intl-hnk/index.html', 'url_similarity': 0.9473684210526315}, {'domain': 'cnn', 'is_alt': False, 'is_amp': False, 'is_cached': None, 'is_valid': True, 'type': 'OG_URL', 'url': 'https://www.cnn.com/us/live-news/damar-hamlin-collapse-bills-bengals-game-intl-hnk/index.html', 'url_similarity': 0.9473684210526315}, {'domain': 'cnn', 'is_alt': False, 'is_amp': False, 'is_cached': None, 'is_valid': True, 'type': 'SCHEMA_MAINENTITY', 'url': 'https://www.cnn.com/us/live-news/damar-hamlin-collapse-bills-bengals-game-intl-hnk/index.html', 'url_similarity': 0.9473684210526315}], 'origin': {'domain': 'cnn', 'is_amp': True, 'is_cached': False, 'is_valid': True, 'url': 'https://amp.cnn.com/cnn/us/live-news/damar-hamlin-collapse-bills-bengals-game-intl-hnk/index.html'}}]

whilest
https://www.amputatorbot.com/api/v1/convert?gac=True&md=3&q=https%3A%2F%2Famp.cnn.com%2Fcnn%2Fus%2Flive-news%2Fdamar-hamlin-collapse-bills-bengals-game-intl-hnk%2Findex.html yields:

{'error_message': "Error: Entry doesn't meet criteria (no AMP link detected)", 'result_code': 'error_no_amp'}
@dgw
Copy link

dgw commented Apr 10, 2024

Yep, ran into this today. Was very confused, because generally the library I'm using for API integrations (Python's requests) Just Does The Right Thing for GET params, but in this case The Right Thing makes the request fail.

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

No branches or pull requests

2 participants