Skip to content

Support of zelluloza.ru#81

Open
nredko wants to merge 2 commits into
OnlyFart:masterfrom
nredko:master
Open

Support of zelluloza.ru#81
nredko wants to merge 2 commits into
OnlyFart:masterfrom
nredko:master

Conversation

@nredko
Copy link
Copy Markdown

@nredko nredko commented Jun 8, 2023

No description provided.


private Task<string> GetChapPics(Uri uri, string page, int numPages)
{
throw new NotImplementedException();
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Подозрительно...

public class ZellulozaGetter : GetterBase
{
private string _nonce;
private string _ze_hash = "dummy";
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не нашел нигде использования этого поля, которое бы подразумевало, что оно должно быть полем, а не локальной переменной

{
await base.Init();
var response = await Config.Client.GetWithTriesAsync(SystemUrl.MakeRelativeUri("/my/"));
var doc = await response.Content.ReadAsStringAsync().ContinueWith(t => t.Result.AsHtmlDoc());
Copy link
Copy Markdown
Owner

@OnlyFart OnlyFart Jun 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Кажется это можно заменить на Config.Client.GetHtmlDocWithTriesAsync(SystemUrl.MakeRelativeUri("/my/"))

var doc = await Config.Client.GetHtmlDocWithTriesAsync(url);
#if DEBUG
doc.Save(new FileStream("z.html", FileMode.OpenOrCreate));
#endif
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Лучше DEBUG убрать

{
var seria = new Seria()
{
Name = doc.QuerySelector("p[class=jb > a[class=lnk] > b")?.InnerHtml.Replace("'", ""),
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Селектор битый. Не уверен, что оно вообще работает. К тому же лучше использовать селекторы по классу "p.jb > a.lnk > b"


#if DEBUG
doc.Save(new FileStream($"{id}.html", FileMode.OpenOrCreate));
#endif
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Лучше убрать

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants