0
我有一個這樣的字符串:刮谷歌學術安全頁
url = 'http://scholar.google.pl/citations?view_op\x3dsearch_authors\x26hl\x3dpl\x26oe\x3dLatin2\x26mauthors\x3dlabel:security\x26after_author\x3drukAAOJ8__8J\x26astart\x3d10'
我想將它轉化成這樣:
converted_url = 'https://scholar.google.pl/citations?view_op=search_authors&hl=en&mauthors=label:security&after_author=rukAAOJ8__8J&astart=10'
我已經試過這樣:
converted_url = url.decode('utf-8')
然而,這個錯誤被拋出:
AttributeError: 'str' object has no attribute 'decode'
BTW: [獲取谷歌學者標籤的作者姓名和URL](http://stackoverflow.com/questions/41324356/get-authors-name-and-url-for-tag-from-google-scholar) – furas