Open Benjamin-Loison opened 8 months ago
load_log_string.py
:
import json
with open('log.json') as f:
print(json.load(f))
python3 load_log_string.py > log_string.txt
getJSONPathFromKey log_string.txt '' ytInitialPlayerResponse | grep -- '--string'
30 /videoDetails/shortDescription --string
61 /microformat/playerMicroformatRenderer/description/simpleText --string
curl 'https://www.youtube.com/watch?v=mWdFMNQBcjs' > video.html
getJSONPathFromKey video.html | grep -- 'string'
119 /contents/twoColumnWatchNextResults/results/results/contents/1/videoSecondaryInfoRenderer/attributedDescription/content --string
184 /engagementPanels/2/engagementPanelSectionListRenderer/content/structuredDescriptionContentRenderer/items/1/expandableVideoDescriptionBodyRenderer/attributedDescriptionBodyText/content --string
There are other occurrences as HTML tags:
grep -o -- '.\{0,50\}--string.\{0,50\}' log.json
blic video\"><meta name=\"description\" content=\"--string0:00 Beginning0:06 Middle0:12 End\"><meta name=\"k
720\"><meta property=\"og:description\" content=\"--string0:00 Beginning0:06 Middle0:12 End\"><meta property
eo\"><meta name=\"twitter:description\" content=\"--string0:00 Beginning0:06 Middle0:12 End\"><meta name=\"t
video\"><meta itemprop=\"description\" content=\"--string0:00 Beginning0:06 Middle0:12 End\"><meta itemprop
",\"isOwnerViewing\":false,\"shortDescription\":\"--string\\n\\n0:00 Beginning\\n0:06 Middle\\n0:12 End\",\"
public video\"},\"description\":{\"simpleText\":\"--string\\n\\n0:00 Beginning\\n0:06 Middle\\n0:12 End\"},\
Should check if all other fields retrievable with YouTube operational API have HTML tags. Note that:
grep -o -- '.\{0,50\}--string.\{0,50\}' videos.html
"720"><meta property="og:description" content="--string0:00 Beginning0:06 Middle0:12 End"><meta property=
video"><meta name="twitter:description" content="--string0:00 Beginning0:06 Middle0:12 End"><meta name="twi
blic video"><meta itemprop="description" content="--string0:00 Beginning0:06 Middle0:12 End"><meta itemprop=
eB3zQ","isOwnerViewing":false,"shortDescription":"--string\n\n0:00 Beginning\n0:06 Middle\n0:12 End","isCraw
t":"A public video"},"description":{"simpleText":"--string\n\n0:00 Beginning\n0:06 Middle\n0:12 End"},"lengt
ITY_HIDDEN"}},"attributedDescription":{"content":"--string\n\n0:00 Beginning\n0:06 Middle\n0:12 End","comman
ins"},"attributedDescriptionBodyText":{"content":"--string\n\n0:00 Beginning\n0:06 Middle\n0:12 End","comman
And even YouTube operational API instances home webpage?
Related to #11.