From db241cec0e33c879bd81bf669f0eb4bd375ad770 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 12 May 2020 10:46:17 +0200 Subject: [PATCH 1/2] akas is gone --- ox/web/imdb.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ox/web/imdb.py b/ox/web/imdb.py index fb109be..ac12c83 100644 --- a/ox/web/imdb.py +++ b/ox/web/imdb.py @@ -36,7 +36,7 @@ def delete_url(url, data=None, headers=cache.DEFAULT_HEADERS): cache.store.delete(url, data, headers) def get_url(id): - return "http://akas.imdb.com/title/tt%s/" % id + return "http://www.imdb.com/title/tt%s/" % id def reference_section(id): @@ -334,7 +334,6 @@ class Imdb(SiteParser): return self._cache[url] def __init__(self, id, timeout=-1): - # use akas.imdb.com to always get original title: # http://www.imdb.com/help/show_leaf?titlelanguagedisplay self.baseUrl = "http://www.imdb.com/title/tt%s/" % id super(Imdb, self).__init__(timeout) @@ -628,7 +627,7 @@ def get_movie_by_title(title, timeout=-1): except: params['q'] = params['q'].encode('utf-8') params = urlencode(params) - url = "http://akas.imdb.com/find?" + params + url = "http://www.imdb.com/find?" + params data = read_url(url, timeout=timeout, unicode=True) #if search results in redirect, get id of current page r = '' @@ -705,7 +704,7 @@ def get_movie_id(title, director='', year='', timeout=-1): except: params['q'] = params['q'].encode('utf-8') params = urlencode(params) - url = "http://akas.imdb.com/find?" + params + url = "http://www.imdb.com/find?" + params #print url data = read_url(url, timeout=timeout, unicode=True) From 11376c5d7d9e2d9bf96627104a188499f62bc5ce Mon Sep 17 00:00:00 2001 From: j Date: Tue, 26 May 2020 10:22:58 +0200 Subject: [PATCH 2/2] support backtick strings --- ox/js.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ox/js.py b/ox/js.py index 43b6fb0..2f419bd 100644 --- a/ox/js.py +++ b/ox/js.py @@ -95,7 +95,7 @@ def tokenize(source): '.', ',', ';' ] REGEXP = 'abcdefghijklmnopqrstuvwxyz' - STRING = '\'"' + STRING = '\'"`' WHITESPACE = ' \t' def is_regexp(): # checks if a forward slash is the beginning of a regexp,