Comments (4)
There used to be a problem where we got back an empty page, but only sometimes. Re-requesting the page immediately didn't make it work, but waiting a few seconds and then re-request the page usually made it work just fine. I'd have to check if this is still the case.
from abc.bundle.
Re-requesting the page immediately didn't make it work, but waiting a few seconds and then re-request the page usually made it work just fine.
But isn't the code backward then?
try:
html = HTML.ElementFromURL(url, sleep=5.0)
except:
html = HTML.ElementFromURL(url, cacheTime=0)
This "sleeps" up to 5sec before sending out the request - if another one was made just prior. Then, if an error occurred re-requests the page again, right?
With my understanding of you explanation you would request a page - and if it comes back empty re-request again after a 5sec waiting period. But this would look like...
try:
html = HTML.ElementFromURL(url)
except:
html = HTML.ElementFromURL(url, cacheTime=0, sleep=5.0)
Or do I get the ElementFromURL() wrong?
from abc.bundle.
The sleep will take place after the http request, and only if we do not grab the data from cache.
http://dev.plexapp.com/docs/api/networkkit.html?highlight=sleep#http
Since we do not know if we will get back any usable data, we always have to do this pause.
from abc.bundle.
Ah... got it - the laggy response is actually caused by the request BEFORE, essentially stopping operation for the next 5sec. I still would prefer a smaller timeout - if feasible, that is. :-)
from abc.bundle.
Related Issues (15)
- enable "earlier" shows? HOT 5
- Enable channel on MacOSX + Plex home Theater HOT 1
- AFV "Associated Server is no longer accessible" HOT 8
- Will not direct play on ATV4. HOT 1
- Json keyerror
- Need to filter out episodes that require authorization
- Should use RealRTMP
- sslv3 alert handshake failure HOT 1
- ABC videos not playing HOT 3
- Content Unavailable HOT 3
- Episode playback fails on TiVo Hydra client HOT 3
- ABC News returns "Video unavailable" HOT 1
- Show listing broken HOT 1
- ABC using flash video? HOT 1
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 abc.bundle.