Bugswriter / tuxi

Tuxi is a cli assistant. Get answers of your questions instantly.
GNU General Public License v3.0
1.33k stars 73 forks source link

[Bug] Time now is not working now? #97

Closed Bugswriter closed 3 years ago

Bugswriter commented 3 years ago

image

Can someone figure out why we are losing some pre existing functionality?

Bugswriter commented 3 years ago

I think our develop branch is having lot of issues in comparison to our main branch. I just tested our current version time now feature . I think we should make a long test .. with more questions.

colonvirus commented 3 years ago
rich=$(echo "$google_html" | pup 'div.XcVN5d text{}' | recode html..ISO-8859-1)
[ -n "$rich" ] && output "$rich" && exit 0

This was changed to

rich=$(echo "$google_html" | pup 'div.bbVIQb, div.ujudUb, div.mR2gOd text{}' | sed 's/^ //' | recd)
snipcall "$rich"
colonvirus commented 3 years ago

We need to stop adding any more features till we sort everything out, and make better tests. + images for each SERP

sudocanttype commented 3 years ago

We should make a more in-depth test script. That being said, we could definitely just program a function that checks for time.

Bugswriter commented 3 years ago

Yes I am putting new features on hold. Also why not just reverting back ? Why we are having this issue?

colonvirus commented 3 years ago
# This serves for a lot of things, simplified for performance
# Rich Answers      ( eg: elevation of mount everest )
# bbVIQb & ujudUb   ( eg: gecgecgec lyrics )                 ( Lyrics )
# mR2g0d            ( eg: game of thrones s03 episodes )     ( Somewhat complicated lists )
rich=$(echo "$google_html" | pup 'div.bbVIQb, div.ujudUb, div.mR2gOd text{}' | sed 's/^ //' | recd)
snipcall "$rich"

this implementation of rich answers doesn't support time now

Bugswriter commented 3 years ago

We should make a more in-depth test script. That being said, we could definitely just program a function that checks for time.

No we need to scrape time. I believe time is a rich answer. Also script goal is to just scrape cream information google give except search results.

Bugswriter commented 3 years ago
# This serves for a lot of things, simplified for performance
# Rich Answers      ( eg: elevation of mount everest )
# bbVIQb & ujudUb   ( eg: gecgecgec lyrics )                 ( Lyrics )
# mR2g0d            ( eg: game of thrones s03 episodes )     ( Somewhat complicated lists )
rich=$(echo "$google_html" | pup 'div.bbVIQb, div.ujudUb, div.mR2gOd text{}' | sed 's/^ //' | recd)
snipcall "$rich"

this implementation of rich answers doesn't support time now

Rich answer is a very important .. Can't we just find one key stuff which is common is all rich answer? or put multiple scrapes for diff-2 conditions?

sudocanttype commented 3 years ago

Huh, it looks like time isnt included in tuxi. image None of these div.classes are referred to in the script

colonvirus commented 3 years ago
rich=$(echo "$google_html" | pup 'div.XcVN5d text{}' | recode html..ISO-8859-1)
[ -n "$rich" ] && output "$rich" && exit 0

This does, but was removed

sudocanttype commented 3 years ago

ok then, just add it back. image boom it works EDIT: actually wait lemme try the test script

Bugswriter commented 3 years ago

Huh, it looks like time isnt included in tuxi. image None of these div.classes are referred to in the script

Well I guess .XcVN5d is common in every scrape.

Bugswriter commented 3 years ago

ok then, just add it back. image boom it works

This looks fine. I guess we will able to get all .. rich text. This is a ++ not -- we need to think before tinkering with something which is working.

colonvirus commented 3 years ago

Should we document all the div classes? This will get messy soon

sudocanttype commented 3 years ago

Yep, we probably should document all the classes.

Bugswriter commented 3 years ago

Yes with images. That's what I am proposing yesterday where should we have a document? I don't think repo is a good idea.

colonvirus commented 3 years ago

Wiki?

sudocanttype commented 3 years ago

Just ran the quality test script, everything seems to be functioning well after adding the additional div

Bugswriter commented 3 years ago

Lol Tuxi wiki .. just make a gist IG

Bugswriter commented 3 years ago

We need to extend our qualitytest script to add more. . questions.

Bugswriter commented 3 years ago

Guys I am not good with documenting stuff? So who will start .. I ll add stuff. After looking at way you add. Also please put small small images.

colonvirus commented 3 years ago

I'll document it, but I haven't tried gists 😅

Bugswriter commented 3 years ago

I'll document it, but I haven't tried gists sweat_smile

use whatever you like.

sudocanttype commented 3 years ago

I can start working on more test cases

colonvirus commented 3 years ago

Can I just make a repo? Gist doesn't allow folders

sudocanttype commented 3 years ago

How should we implement adding "div.XcVN5d" back to rich? Should we just make a new PR, or just manually edit it in?

colonvirus commented 3 years ago

Make a quick pr, and then we won't allow any more prs till we sort everything.

Bugswriter commented 3 years ago

PR

sudocanttype commented 3 years ago

ok, making a pr

sudocanttype commented 3 years ago

its #99