Skip to content

Instantly share code, notes, and snippets.

@cabrinha
Last active December 17, 2015 20:29
Show Gist options
  • Save cabrinha/e08292850b1444062584 to your computer and use it in GitHub Desktop.
Save cabrinha/e08292850b1444062584 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import requests
from bs4 import BeautifulSoup
#url = 'https://uk.groups.yahoo.com/neo/groups/HeimdagsLibrary/conversations/messages/1'
url = 'https://uk.groups.yahoo.com/neo/groups/HeimdagsLibrary/conversations/topics/1'
cookies = {'DSS': 'ts=1442348183&cnt=0&sdts=1445305404&sdtp=mozilla', 'AO': 'u=1', 'YLS': 'v=1&p=1&n=1', 'ypcdb': '69cd7fb4296161babab534e4ad0d47ea', 'B': '67l11ihavgv4j&b=4&d=ODec0pRpYEKJLWCYxZEwzXL2fPk-&s=4k&i=Jz5T.GiEm3rdVsNrrFCU', 'Y': 'v=1&n=5kr1dhpkab8fs&l=m8ddo.gjf8/o&p=m2s0000012000000&r=v2&lg=en-US&intl=us', 'PH': 'fn=KYNqFqE1adTUVw19k4TC_A--&l=en-US&i=us', 'ywandp': '1000714451879%3A1849880863'}
headers = {"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:42.0) Gecko/20100101 Firefox/42.0",
"Accept": "text/html"}
response = requests.get(url, cookies=cookies, headers=headers)
html = response.content
soup = BeautifulSoup(html, "html.parser")
#div = soup.find("li", {"class": "yg-msg-read-container clrfix"})
print soup.prettify
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment