Closed tillea closed 2 years ago
try to use urllib.parse.urlencode
import urllib.parse
params = urllib.parse.urlencode(params)
url = "https://webtv.feratel.com/webtv/?%s" % params
Am Sun, Feb 06, 2022 at 04:11:08AM -0800 schrieb abdou4a:
try to use urllib.parse.urlencode
import urllib.parse params = urllib.parse.urlencode(params) url = "https://webtv.feratel.com/webtv/?%s" % params
Thanks for the hint. I tried this but the resulting string does not look different from what I tried and so the website keeps on returning 404.
Kind regards, Andreas.
Hi, I have retested this on the latest version and believe it's fixed, as the params
parameter can now be used 😄
My test code was as follows:
import requests
from rrequests_ip_rotator import ApiGateway
webhook_id = "808569d8-4aa4-4c3f-9281-289ff6628c6b"
gateway = ApiGateway("https://webhook.site", regions=["eu-west-2"])
gateway.shutdown()
gateway.start()
s = requests.Session()
s.mount("https://webhook.site", gateway)
url = f"https://webhook.site/{webhook_id}/?cam=3175&t=12&design=v4"
resp = s.get(url)
print(resp.text)
url = f"https://webhook.site/{webhook_id}/"
params = {
"cam": 3175,
"t": 12,
"design": "v4"
}
s.get(url, params=params)
Hi, I want to download URLs with certain parameters. For instance when trying to download
I can do with plan request
It does not work when simply specifying the full URL and leaving out
params
.Unfortunately for the
get
method of the session inrequests-ip-rotator
there is noparams
parameter and I guess this is the reason why trying to fetch the link above fails.Kind regards Andreas.