Little refactoring
This commit is contained in:
parent
f5f1c42536
commit
865880504b
|
@ -86,25 +86,6 @@ class ChannelUploadPage {
|
|||
: _root = parser.parse(raw);
|
||||
}
|
||||
|
||||
void x() {
|
||||
ChannelUploadPageId _id;
|
||||
// @getContentContext
|
||||
var x = _id.contents.twoColumnBrowseResultsRenderer.tabs
|
||||
.map((e) => e.tabRenderer)
|
||||
.firstWhere((e) => e.selected)
|
||||
.content
|
||||
.sectionListRenderer
|
||||
.contents
|
||||
.first
|
||||
.itemSectionRenderer
|
||||
.contents
|
||||
.first
|
||||
.gridRenderer
|
||||
.items;
|
||||
|
||||
_id.response.continuationContents.gridContinuation.items;
|
||||
}
|
||||
|
||||
class _InitialData {
|
||||
// Json parsed map
|
||||
final ChannelUploadPageId root;
|
||||
|
|
|
@ -26,13 +26,13 @@ class SearchPage {
|
|||
|
||||
///
|
||||
_InitialData get initialData =>
|
||||
_initialData ??= _InitialData(json.decode(_matchJson(_extractJson(
|
||||
_initialData ??= _InitialData(json.decode(_extractJson(
|
||||
_root
|
||||
.querySelectorAll('script')
|
||||
.map((e) => e.text)
|
||||
.toList()
|
||||
.firstWhere((e) => e.contains('window["ytInitialData"] =')),
|
||||
'window["ytInitialData"] ='))));
|
||||
'window["ytInitialData"] =')));
|
||||
|
||||
///
|
||||
String get xsfrToken => _xsrfToken ??= _xsfrTokenExp
|
||||
|
|
Loading…
Reference in New Issue