Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the Description bug #1863

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Prithvi824
Copy link

Since the video info was not returning anything related to description, I created another http get request to fetch the description using regex.

Copy link
Contributor

@glubsy glubsy left a comment

Choose a reason for hiding this comment

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

Why get rid of getting data from vid_info altogether? It should at least be used as a fallback.

Also, not really fond of doing requests inside a property getter. It should be a separate function/method, and I also think it should be called as a fallback if nothing is found in vid_info.

Comment on lines 379 to 380
ind1 = page_detail.index(''.join(match1)) + 19
ind2 = page_detail.index(''.join(match2)) - 3
Copy link
Contributor

Choose a reason for hiding this comment

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

What are these magic numbers?

Copy link
Author

Choose a reason for hiding this comment

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

Initially, I considered creating another request and then retrieving the description from the HTML. However, I discovered that "self.watch_html" also contains the description between "Shortdescription" and "iscrawlable." Therefore, I utilized a regex to find their indexes and return anything in between them, which constitutes the description. The addition and subtraction of 3 is for removing the colon and double quotes to get the text only.

The latest commit "Removed Internal request for Description - 2" consist of all the changes i mentioned

@Prithvi824
Copy link
Author

Using vid_info wouldn't be useful as it doesn't contain relevant information regarding the description.

@Prithvi824
Copy link
Author

Any Update??

Copy link
Contributor

@glubsy glubsy left a comment

Choose a reason for hiding this comment

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

Looks good to me

@Prithvi824
Copy link
Author

Waiting for it to get merged then.

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.

None yet

2 participants