clips / clips/pattern

Integrate API changes (pattern.web)

Open
#181 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help
Dominant language
Python
Stars
8.9k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

Some of the APIs for services (such as Bing Search API, Google Translate API and Facebook) supported by pattern.web are deprecated, require a paid subscription or have changed in some other way.

  1. Bing yields URLError: Invalid header value 'BasicO lZuSkVLNEhUbG50RTNTeUY1OFFMa1VDTHAvNzh0a1lqVjFGbDNKN2xIYTA9\n' when running the example in examples/01-web/03-bing.py.
  2. Google (Translate) yields HTTP401Authentication: Google translate API is a paid service when running the example in examples/01-web/02-google-translate.py.
    • In fact, the Google Cloud Translation API is a paid service now and apparently has no free quota.
  3. Facebook yields HTTP401Authentication: when running the example in examples/01-web/11-facebook.py.
    • Seems that Facebook Graph API has changed.
  4. Yahoo: HTTP401Authentication: Yahoo search API is a paid service
    • The BOSS JSON Search API is discontinued since March 31, 2016.
  • The following services seem to work fine: Twitter, Google Search, Flickr, Wikipedia, Wikia
  • I haven't checked for: DuckDuckGo (and there might be more missing!)

We should find out if any of the authentication errors are simply related to outdated tokens that simply need to be updated or if they actually require a (new) subscription. If they require a subscription, we should find out whether they offer a free quota (e.g. 100 request/day or something). If not, users will have to deal with license keys themselves, in this case we should raise some exception when no license key is provided.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the affected examples in examples/01-web/03-bing.py, 02-google-translate.py, and 11-facebook.py, then inspect the corresponding pattern.web integrations. Check the listed Bing, Google Translate, Facebook, and Yahoo failures and determine the required authentication or service changes. Done means the supported examples have a defined working path or clearly report the required license key and unavailable services.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.