Skip to content

Instantly share code, notes, and snippets.

@ShilGen
Created April 3, 2024 20:53
Show Gist options
  • Save ShilGen/734453fae5ba767f3fee9c923df3290a to your computer and use it in GitHub Desktop.
Save ShilGen/734453fae5ba767f3fee9c923df3290a to your computer and use it in GitHub Desktop.
def get_wb_url(nm):
vol = nm // 100000
part = nm // 1000
if (vol >= 0 and vol <= 143) :
host = "//basket-01.wb.ru"
if vol >= 144 and vol <= 287:
host = "//basket-02.wb.ru"
if vol >= 288 and vol <= 431:
host = "//basket-03.wb.ru"
if vol >= 432 and vol <= 719:
host = "//basket-04.wb.ru"
if vol >= 720 and vol <= 1007:
host = "//basket-05.wb.ru"
if vol >= 1008 and vol <= 1061:
host = "//basket-06.wb.ru"
if vol >= 1062 and vol <= 1115:
host = "//basket-07.wb.ru"
if vol >= 1116 and vol <= 1169:
host = "//basket-08.wb.ru"
if vol >= 1170 and vol <= 1313:
host = "//basket-09.wb.ru"
if vol >= 1314 and vol <= 1601:
host = "//basket-10.wb.ru"
if vol >= 1602 and vol <= 1655:
host = "//basket-11.wb.ru"
if vol >= 1656 :
host = "//basket-12.wb.ru"
return (host + "/vol" + str (vol) + "/part"+ str(part) + "/" + str(nm))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment