Open marcvisconte opened 6 years ago
@marcvisconte This can be corrected if you change the code as shown in attached screenshot. The highlighted part is the change/modification. After this if anything occur like any sort of error, please share with me.
and for removing/ignoring the warning, paste this two lines on top of your code where u are importing the libraries:- from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
Hi @Priyansh2 The solution suggested by you seems to be a safe way of handling the error. I'd recommend you to submit a PR for the same :) Thanks!
@Priyansh2 , Thank you, that is awesome. I had totally forgotten about this due to work and haven't revisited. I will try to test this and will respond. Question: What editor are you use? Is that PyCharm? I need to work on my Python skills, and that would include using good tools. :-D
@marcvisconte That editor is Atom. You can use sublime too. I preferred these two. Pycharm is really good editor and you can google for others as well. Btw I then encounters ProxyError too in addtion and so added general Exception handling condition which can handle all exceptions and @gupta-meghna64 You can add other websites too for collecting lyrics. It seems your current system lacks some of the important websites which have huge amount of lyrical data of almost any song.
Testing using Python 3.6 Have converted raw_input to input (for 3.6). I noticed two issues when attempting to run from my Win7 enterprise system:
Unverified HTTPS:
This is a warning, not an error. As I know that this is being submitted to YouTube, I feel comfortable ignoring this, and may turn off the reporting for this.
Invalid literal for int():
The search term I used wound up returning a playlist. The error comes from the code trying to parse this. I am just learning Python, and how different functions work, so I cannot comment on BeautifulSoup, or parsing, or what to do. I am just guessing in this case.
<ul class="yt-lockup-meta-info"><li><a class="yt-uix-sessionlink spf-link " data-sessionlink="itct=CFIQ2zAYAyITCL6Ql-eQ29gCFZCtnAodtcsMnyj0JA" href="/playlist?list=PLBsMOSI47IehIwYpjFxfwMCm1FJvd3ti3">View full playlist (41 videos)</a></li></ul>