diff --git a/compiler/comp/fb.py b/compiler/comp/fb.py index 9b987dc..2a0ac64 100644 --- a/compiler/comp/fb.py +++ b/compiler/comp/fb.py @@ -46,5 +46,6 @@ def fbfeed(url, raw): arts.append(aa) nx=None if js.has_key("paging") and js["paging"].has_key("next"): - nx=js["paging"]["next"] + un=urlparse.urlparse(js["paging"]["next"]) + nx=urlparse.urlunsplit((u[0],u[1],u[2],un[4],un[3])) return {"url": url, "next_page": nx,"articles": arts} diff --git a/compiler/fetching.py b/compiler/fetching.py index 8201de4..1d8646f 100644 --- a/compiler/fetching.py +++ b/compiler/fetching.py @@ -15,7 +15,8 @@ def announce_articleid(id): s.get( u % id) def downloadfile(url): - relative_name=path.join("downloads",str(md5(url).hexdigest()),url.split('/')[-1]) + u=urlparse.urlparse(url) + relative_name=path.join("downloads",str(md5(url).hexdigest()),u[2].split('/')[-1]) local_filename = path.join(download_path,relative_name) if not os.path.exists(os.path.dirname(local_filename)): try: