ivkos / wallhaven4j Goto Github PK
View Code? Open in Web Editor NEWWallhaven API for Java
License: MIT License
Wallhaven API for Java
License: MIT License
Hi, I'm using your api, so above all, thank you for what you did :)
Here is my problem: some time it work normal, but sometimes it goes wrong, and throw exception below:
Exception in thread "Thread-6" com.ivkos.wallhaven4j.util.exceptions.ParseException: Could not parse favorites count in thumbnail of Wallpaper
at com.ivkos.wallhaven4j.util.exceptions.DescriptiveParseExceptionSupplier.lambda$forResource$1(DescriptiveParseExceptionSupplier.java:26)
at com.ivkos.wallhaven4j.util.exceptions.DescriptiveParseExceptionSupplier$$Lambda$2.get(Unknown Source)
at com.ivkos.wallhaven4j.util.exceptions.DescriptiveParseExceptionSupplier.get(DescriptiveParseExceptionSupplier.java:34)
at com.ivkos.wallhaven4j.util.exceptions.DescriptiveParseExceptionSupplier.get(DescriptiveParseExceptionSupplier.java:8)
at com.ivkos.wallhaven4j.util.htmlparser.OptionalSelector.orElseThrow(OptionalSelector.java:45)
at com.ivkos.wallhaven4j.util.pagecrawler.thumbnailpage.ThumbnailTransformer.transform(ThumbnailTransformer.java:72)
at com.ivkos.wallhaven4j.util.pagecrawler.thumbnailpage.ThumbnailPageCrawler$$Lambda$1.apply(Unknown Source)
at com.google.common.collect.Lists$TransformingRandomAccessList$1.transform(Lists.java:640)
at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
at java.util.AbstractCollection.toArray(AbstractCollection.java:141)
at java.util.Collections$UnmodifiableCollection.toArray(Collections.java:1033)
at java.util.ArrayList.addAll(ArrayList.java:577)
at com.ivkos.wallhaven4j.util.pagecrawler.thumbnailpage.ThumbnailPageCrawler.getPageSequence(ThumbnailPageCrawler.java:94)
at com.ivkos.wallhaven4j.Wallhaven.search(Wallhaven.java:171)
at cn.dalin.WallhavenFetcherController.lambda$startDownloadOnClick$7(WallhavenFetcherController.java:114)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.ivkos.wallhaven4j.util.exceptions.ParseException: No such element: a.wall-favs
at com.ivkos.wallhaven4j.util.htmlparser.OptionalSelector.orElseThrow(OptionalSelector.java:48)
Actually, I know what dose that means, I'm just wondering if it's due to I am in China and my connection to Wallhaven is not fast enough? Is there any other possible reason?
Hello,
First of all, thanks for this awesome library!
Wallhaven is no more in alpha (yay!), the website as been updated leading to the fact that this API is now broken.
Anyway, Wallhaven now has an officiel API: https://wallhaven.cc/help/api !
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.