Jump to content
Korean Random
Sign in to follow this  

BigWorld.fetchURL() vs urllib: which is better and why?

Recommended Posts

Hello everyone,


I am currently working on my first mod for WoT and I'm trying to decide which method to use for fetching URLs, BigWorld.fetchURL() or urllib. I am wondering if anyone has experience with both and can share their thoughts on which one is better and why.


Thank you in advance for any input!

Share this post

Link to post

Short link
Share on other sites

Two main differences


1) different SSL backend

* BigWorld.fetch() --> libcurl --> Windows Secure Channel

* urllib1/2/3 -> CPython _ssl -> OpenSSL


The CPython _ssl module supports TLS 1.2 since version 2.7.9, but WoT used Python 2.7.7 before the v1.18.0 release, which made BigWorld.fetch() the only possible way to communicate with hosts supporting TLS1.2 only.


Since WoT 1.18.0 the game client switched to 2.7.18, this problem solved.


2) BigWorld.fetch() supports async-style and invokes callback on response





for XVM we use urllib3 + certifi to unify the network stack with other middlewares (sentry-python uses urllib3, so here we are)


in general, BigWorld.fetch() looks like a more flawless solution for WoT.


Edited by Mixaill
  • Upvote 2

Share this post

Link to post

Short link
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...