Python:从查询字符串编码文本

时间:2017-03-30 12:14:23

标签: python urllib

我有网址和查询字符串

yandex.ru/search/?text=%D0%9B%D0%B0%D0%BA-%D0%B3%D0%B5%D0%BB%D1%8C%20%D0%B4%2F%D0%BD%D0%BE%D0%B3%D1%82%D0%B5%D0%B9%2010%20%D0%BC%D0%BB.&lr=11168
%D0%9B%D0%B0%D0%BA-%D0%B3%D0%B5%D0%BB%D1%8C%20%D0%B4%2F%D0%BD%D0%BE%D0%B3%D1%82%D0%B5%D0%B9%2010%20%D0%BC%D0%BB.

yandex.ru/search/?text=02-250%20%D0%9B%D0%B0%D0%BA%20%D0%B4%D0%BB%D1%8F%20%D0%BD%D0%BE%D0%B3%D1%82%D0%B5%D0%B9%2010%20%D0%BC%D0%BB.%20alessandro&lr=11168
02-250%20%D0%9B%D0%B0%D0%BA%20%D0%B4%D0%BB%D1%8F%20%D0%BD%D0%BE%D0%B3%D1%82%D0%B5%D0%B9%2010%20%D0%BC%D0%BB.%20alessandro

我尝试使用urllib.parse.parse_qs进行查询 但它返回错误ValueError

有没有办法从网址获取查询字符串?

0 个答案:

没有答案