You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you look at copy_session() in instalodercontext.py, it copies the cookies and headers, but does not copy the existing proxy along with them.
When you do something that copies the session
(in my case instaloader.Profile.from_username() )
the request will be sent through my IP
To fix this, I added the following line of code to copy_session() to fix it
new.proxies = session.proxies
So my question is, is there a reason why 'copy_session()' doesn't copy the proxy?
Or am I missing something in the instructions?
my code :
L = instaloader.Instaloader()
L.context._session.proxies = {
'http': f'http://proxyip:port',
'https': f'http://proxyip:port',
}
try:
profile = instaloader.Profile.from_username(L.context, 'ash.island')
except instaloader.exceptions.ConnectionException as e :
print(e)
posts = profile.get_posts()
for idx, post in enumerate(posts):
L.download_post(post, profile.full_name)
if idx >= 500:
break
time.sleep(random.randint(1,7))
The text was updated successfully, but these errors were encountered:
I am using the scrapingbee proxy. It seems this method is not working for me. I got an SSL verification error. If I set the new.verify = False, it returns HTTP error code 500. I am new to this. Do you have any recommendations on how to resolve the issue?
If you look at copy_session() in instalodercontext.py, it copies the cookies and headers, but does not copy the existing proxy along with them.
When you do something that copies the session
(in my case instaloader.Profile.from_username() )
the request will be sent through my IP
To fix this, I added the following line of code to copy_session() to fix it
new.proxies = session.proxies
So my question is, is there a reason why 'copy_session()' doesn't copy the proxy?
Or am I missing something in the instructions?
my code :
The text was updated successfully, but these errors were encountered: