我正在使用 getInProgressItem(): any {
// tslint:disable-next-line:only-arrow-functions
// tslint:disable-next-line:typedef
const a = this.queue.pipe(filter((result, id): any => {
return result.filter((x) => x.inProgress() === true);
}));
return a;
}
getSuccussItem(): any {
// tslint:disable-next-line:only-arrow-functions
// tslint:disable-next-line:typedef
// tslint:disable-next-line:no-unused
const b = this.queue.pipe(filter((result, id): any => {
return result.filter((x) => x.isSuccess() === true);
}));
return b;
}
<span *ngIf="(getInProgressItem().length > 0 | async)"
class="c-fileupload__indicator">Uploading</span>
<span *ngIf="(getSuccussItem().length > 0 | async)"
class="c-fileupload__indicator">Uploaded</span>
库,如下所示:
requests_html
每隔一段时间我会收到此错误:
from requests_html import HTMLSession
for url in urls:
...
session = HTMLSession()
r = session.get(url)
r.html.render()
...
并且代码被卡在那里并且不执行任何操作。 有没有办法使代码继续并处理for循环中的下一个URL?