我正在尝试获取网站的网址,但无法弄清楚如何获取网址,
using (var mgr = new ServerManager())
{
foreach (var site in mgr.Sites)
{
var siteURL = site. ??
这是我正在使用的课程
答案 0 :(得分:1)
@pytest.yield_fixture(autouse=True)
def stub_module_variables():
with patch.object(my_module, 'old_first_variable', new=new_first_variable):
with patch.object(my_module, 'old_second_variable', new=new_second_variable):
yield
答案 1 :(得分:-1)
站点是网站集,您可以通过循环浏览其项目来获取网站。
如果您只是在寻找网站的网址,为什么不使用Request对象。