mirror of
https://github.com/soimort/you-get.git
synced 2025-03-13 11:24:02 +03:00
Update test.py
This commit is contained in:
parent
63a7662be4
commit
9d12e8a4aa
@ -8,13 +8,12 @@ url = "https://www.bilibili.com/video/BV1GV411p7P9"
|
|||||||
path = os.path.dirname(os.path.realpath(__file__))
|
path = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
|
||||||
def getJson(url):
|
def getJson(url):
|
||||||
from you_get import common as you
|
|
||||||
try:
|
try:
|
||||||
__console__ = sys.stdout
|
__console__ = sys.stdout
|
||||||
f = io.StringIO()
|
f = io.StringIO()
|
||||||
sys.stdout = f
|
sys.stdout = f
|
||||||
sys.argv = ['you-get', url, '--json']
|
sys.argv = ['you-get', url, '--json']
|
||||||
you.main()
|
you_get.main()
|
||||||
text = f.getvalue()
|
text = f.getvalue()
|
||||||
sys.stdout = __console__
|
sys.stdout = __console__
|
||||||
print(text)
|
print(text)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user