You should first instantiate an A instance, then return the url from generate function, then feed the return value to get function in B:
Class A:
def generate(self):
url = "i want access to this variable from Class B"
return url
Class B:
def get(self, url):
# get url variable and do something
# here's how you use it
a = A()
b = B()
b.get(a.generate())
See if that makes sense.
Edit:
If your generate function is set to stone, you could also elevate the url as class variable:
Class A:
def generate(self):
url = "i want access to this variable from Class B"
self.foo_url = url
a = A()
b = B()
# call generate to get the foo_url as property of object a
a.generate()
b.get(a.foo_url)