Comments (6)
No problem at all. I'll keep looking.
from anime-downloader.
Yeah. There are a lot of things to be ironed out in that category.
Funny of me to assume one will get 30 results for every search. If you're willing to open a PR, I'm happy to merge it.
from anime-downloader.
If you are okay with it, let @KashTag take up this issue. I'm sure you'll find a lot more bugs!
from anime-downloader.
That's great @enderlein.
@KashTag If you are interested, please look into this issue.
EDIT: I'm linking the relevant code below,
from anime-downloader.
Sorry I'm still new to Python so I took my stupid time working this out.
I changed the code like this.
def search(query):
# Since this function outputs to stdout this should ideally be in
# cli. But it is used in watch too. :(
try:
search_results = NineAnime.search(query)
except Exception as e:
logging.error(click.style(str(e), fg='red'))
sys.exit(1)
click.echo(format_search_results(search_results))
if not search_results:
print('No such Anime found')
sys.exit(1)
val = click.prompt('Enter the anime no: ', type=int, default=1)
try:
url = search_results[val-1].url
title = search_results[val-1].title
except IndexError:
logging.error('Only maximum of 30 search results are allowed.'
' Please input a number less than 31')
sys.exit(1)
logging.info('Selected {}'.format(title))
return url
I wish I knew how to make it rerun the function instead of exiting.
Now it shows the following:
That last edit was a mistake. Sorry i thought the val variable stored the number of search results. I'll try to find it. I closed the accidental pull request.
If I find out then ill use .format and replace 30 and 31
from anime-downloader.
#14 closes this.
from anime-downloader.
Related Issues (20)
- Missing contributor guidelines.
- animerush - YFVF missing from extractors
- Problem with creating list HOT 1
- Dub version is not downloading
- 'watch' unexpected behavior if list is empty HOT 2
- SmartDL.__init__() got an unexpected keyword argument 'verify' HOT 3
- WinError 2 HOT 2
- [ERROR] CUID#7 - Download aborted.
- watch.json not created HOT 2
- animerush wont try alternate sources on failure
- Python 3.9.10 breaks requests-cache with "TypeError: Invalid first argument to register(). ForwardRef(...) is not a class
- Handle .m3u8 files?
- [ERROR] : 'NoneType' object has no attribute 'group' HOT 3
- Cannot load native module 'Crypto.Cipher._raw_ecb' HOT 1
- add animixplay.to in providers
- Python TypeError when trying to download anything
- How to reset episode number, or go back one episode HOT 2
- No module named 'Crypto' HOT 2
- Android while installing application getting ( subprocess-exited-with-error ) HOT 1
- Demon slayer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anime-downloader.