Skip to content
This repository has been archived by the owner on Mar 17, 2019. It is now read-only.

Commit

Permalink
Fix GIF URL parsing, bump version to 0.8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
dicksonleong committed Jan 13, 2014
1 parent 3e56fb4 commit bff803a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion gagbook.pro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
TEMPLATE = app
TARGET = gagbook

VERSION = 0.8.3
VERSION = 0.8.4
DEFINES += APP_VERSION=\\\"$$VERSION\\\"

QT += network webkit
Expand Down
5 changes: 5 additions & 0 deletions qtc_packaging/debian_harmattan/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
gagbook (0.8.4) unstable; urgency=medium
* Fix GIF URL parsing

-- Dickson <[email protected]> Mon, 13 Jan 2014 23:22:27 +0800

gagbook (0.8.3) unstable; urgency=medium
* Fix unable to download GIFs
* Use 9GAG comments system
Expand Down
7 changes: 1 addition & 6 deletions src/ninegagrequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,7 @@ static QList<GagObject> parseGAG(const QWebElementCollection &entryItems)
gag.setImageUrl(postContainer.findFirst("img.youtube-thumb").attribute("src"));
} else {
gag.setIsGIF(true);
QString dataScript = postContainer.findFirst("div.badge-animated-container-static").attribute("data-script");
int pos = dataScriptImgSrcRegExp.indexIn(dataScript);
if (pos > -1)
gag.setImageUrl(dataScriptImgSrcRegExp.cap(1));
else
qDebug("NineGagRequest::parseGAG(): Can not find GIF src");
gag.setImageUrl(postContainer.findFirst("div.badge-animated-container-animated").attribute("data-image"));
}
} else {
gag.setImageUrl(postContainer.findFirst("img.badge-item-img").attribute("src"));
Expand Down

0 comments on commit bff803a

Please sign in to comment.