Some fixes to new torrents fetcher.

This commit is contained in:
Dessalines 2019-05-05 10:59:56 -07:00
parent 25b66dbf67
commit 54f7fa06f1
3 changed files with 6 additions and 4 deletions

View File

@ -36,6 +36,6 @@ COPY --from=volume /db/torrents.csv /app/
COPY --from=volume /db/torrent_files.json /app/ COPY --from=volume /db/torrent_files.json /app/
COPY scripts /app/scripts COPY scripts /app/scripts
WORKDIR /app/scripts/ WORKDIR /app/scripts/
RUN ["/bin/bash", "-c", "/app/scripts/build_sqlite.sh"] RUN ["/bin/bash", "./build_sqlite.sh"]
EXPOSE 8080 EXPOSE 8080
WORKDIR /app/ WORKDIR /app/

View File

@ -1,7 +1,7 @@
import cfscrape import cloudscraper
request = "GET / HTTP/1.1\r\n" request = "GET / HTTP/1.1\r\n"
cookie_value, user_agent = cfscrape.get_cookie_string("https://itorrents.org/torrent/B415C913643E5FF49FE37D304BBB5E6E11AD5101.torrent") cookie_value, user_agent = cloudscraper.get_cookie_string("https://itorrents.org/torrent/B415C913643E5FF49FE37D304BBB5E6E11AD5101.torrent")
request += "Cookie: %s\r\nUser-Agent: %s\r\n" % (cookie_value, user_agent) request += "Cookie: %s\r\nUser-Agent: %s\r\n" % (cookie_value, user_agent)
# cookie = "Cookie: %s" % (cookie_value) # cookie = "Cookie: %s" % (cookie_value)

View File

@ -1,3 +1,5 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
[[package]] [[package]]
name = "actix" name = "actix"
version = "0.7.5" version = "0.7.5"